summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index 5bf7d498c1..1724225817 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -310,9 +310,9 @@ extern void prefix_ipv4_free(struct prefix_ipv4 *);
extern int str2prefix_ipv4(const char *, struct prefix_ipv4 *);
extern void apply_mask_ipv4(struct prefix_ipv4 *);
-#define PREFIX_COPY(DST, SRC) \
+#define PREFIX_COPY(DST, SRC) \
*((struct prefix *)(DST)) = *((const struct prefix *)(SRC))
-#define PREFIX_COPY_IPV4(DST, SRC) \
+#define PREFIX_COPY_IPV4(DST, SRC) \
*((struct prefix_ipv4 *)(DST)) = *((const struct prefix_ipv4 *)(SRC));
extern int prefix_ipv4_any(const struct prefix_ipv4 *);
@@ -380,15 +380,12 @@ static inline int is_default_prefix(const struct prefix *p)
if (!p)
return 0;
- if ((p->family == AF_INET) &&
- (p->u.prefix4.s_addr == INADDR_ANY) &&
- (p->prefixlen == 0))
+ if ((p->family == AF_INET) && (p->u.prefix4.s_addr == INADDR_ANY)
+ && (p->prefixlen == 0))
return 1;
- if ((p->family == AF_INET6) &&
- (p->prefixlen == 0) &&
- (!memcmp(&p->u.prefix6, &in6addr_any,
- sizeof(struct in6_addr))))
+ if ((p->family == AF_INET6) && (p->prefixlen == 0)
+ && (!memcmp(&p->u.prefix6, &in6addr_any, sizeof(struct in6_addr))))
return 1;
return 0;