summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-08-07 20:00:58 -0300
committerOlivier Dugeon <olivier.dugeon@orange.com>2020-04-30 11:27:20 +0200
commit0b7005375f37efe712820b283bc8677fc93ab57b (patch)
treecdbd35d4b9c947ea1cc6e9ae71d050531242f126 /lib/prefix.h
parent31b5355d6f643a7ce35a8aa2b293d0421ea9c579 (diff)
lib: constify a few parameters of helper functions
Parameters should be const whenever possible to improve code readability and remove the need to cast away the constness of const arguments. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index f2952c38c3..4b2d90d63a 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -522,7 +522,7 @@ static inline int is_default_prefix(const struct prefix *p)
return 0;
}
-static inline int is_host_route(struct prefix *p)
+static inline int is_host_route(const struct prefix *p)
{
if (p->family == AF_INET)
return (p->prefixlen == IPV4_MAX_BITLEN);