diff options
author | Mark Stapp <mjs.ietf@gmail.com> | 2021-07-08 16:10:14 +0200 |
---|---|---|
committer | Mark Stapp <mjs.ietf@gmail.com> | 2021-09-14 16:31:45 +0200 |
commit | 9c86ee1e021f7fbb09c29610de12392ff120e1e7 (patch) | |
tree | eb5cdebb9158d94c9c2e3ff5eeb696abcb4c6481 /lib/prefix.h | |
parent | zebra: use uint32_t instead of __u32 (diff) | |
download | frr-9c86ee1e021f7fbb09c29610de12392ff120e1e7.tar.xz frr-9c86ee1e021f7fbb09c29610de12392ff120e1e7.zip |
lib,zebra: use more const
Use const in ipX_martian apis, and in some zebra apis.
Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
Diffstat (limited to 'lib/prefix.h')
-rw-r--r-- | lib/prefix.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.h b/lib/prefix.h index 944c94f57..c92f5cec5 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -512,7 +512,7 @@ extern char *esi_to_str(const esi_t *esi, char *buf, int size); extern char *evpn_es_df_alg2str(uint8_t df_alg, char *buf, int buf_len); extern void prefix_evpn_hexdump(const struct prefix_evpn *p); -static inline int ipv6_martian(struct in6_addr *addr) +static inline int ipv6_martian(const struct in6_addr *addr) { struct in6_addr localhost_addr; @@ -527,7 +527,7 @@ static inline int ipv6_martian(struct in6_addr *addr) extern int macstr2prefix_evpn(const char *str, struct prefix_evpn *p); /* NOTE: This routine expects the address argument in network byte order. */ -static inline int ipv4_martian(struct in_addr *addr) +static inline int ipv4_martian(const struct in_addr *addr) { in_addr_t ip = ntohl(addr->s_addr); |