summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/attrs.h2
-rw-r--r--lib/route.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/attrs.h b/lib/attrs.h
index 79b7b14a..a75abcd3 100644
--- a/lib/attrs.h
+++ b/lib/attrs.h
@@ -42,7 +42,7 @@ lp_store_adata(struct linpool *pool, const void *buf, uint len)
#define tmp_copy_adata(ad) tmp_store_adata((ad)->data, (ad)->length)
static inline int adata_same(const struct adata *a, const struct adata *b)
-{ return (a->length == b->length && !memcmp(a->data, b->data, a->length)); }
+{ return (!a && !b) || (a->length == b->length && !memcmp(a->data, b->data, a->length)); }
diff --git a/lib/route.h b/lib/route.h
index 1b2f4de6..7e28b91e 100644
--- a/lib/route.h
+++ b/lib/route.h
@@ -237,7 +237,7 @@ ea_list *ea_append(ea_list *to, ea_list *what);
void ea_format_bitfield(const struct eattr *a, byte *buf, int bufsize, const char **names, int min, int max);
/* Normalize ea_list; allocates the result from tmp_linpool */
-ea_list *ea_normalize(const ea_list *e);
+ea_list *ea_normalize(ea_list *e, int overlay);
uint ea_list_size(ea_list *);
void ea_list_copy(ea_list *dest, ea_list *src, uint size);
@@ -414,7 +414,7 @@ static inline int rte_dest(const rte *r)
void rta_init(void);
ea_list *ea_lookup(ea_list *); /* Get a cached (and normalized) variant of this attribute list */
-static inline int ea_is_cached(ea_list *r) { return r->flags & EALF_CACHED; }
+static inline int ea_is_cached(const ea_list *r) { return r->flags & EALF_CACHED; }
static inline ea_list *ea_clone(ea_list *r) { r->uc++; return r; }
void ea__free(ea_list *r);
static inline void ea_free(ea_list *r) { if (r && !--r->uc) ea__free(r); }