summaryrefslogtreecommitdiffstats
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2018-03-06 20:02:52 +0100
committerLou Berger <lberger@labn.net>2018-03-06 20:04:32 +0100
commit996c93142d3abfab0f6d6c800474e22a8cfbdbc5 (patch)
tree2b28846d256c84cf7b7f1a8988fb3267c8611722 /lib/prefix.h
parentbgpd: another change to keep indent.py happy (diff)
downloadfrr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.tar.xz
frr-996c93142d3abfab0f6d6c800474e22a8cfbdbc5.zip
*: conform with COMMUNITY.md formatting rules, via 'make indent'
Signed-off-by: Lou Berger <lberger@labn.net>
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 5bf7d498c..172422581 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;