summaryrefslogtreecommitdiff
path: root/bgpd/bgp_label.h
diff options
context:
space:
mode:
authorMark Stapp <mstapp@nvidia.com>2021-09-29 09:19:21 -0400
committerMark Stapp <mstapp@nvidia.com>2021-10-01 07:48:45 -0400
commitedfee30d6406ac9a350e95657054ec067ced0f59 (patch)
tree089002899efa1383909e77dd2ed69e43f10fff79 /bgpd/bgp_label.h
parentd0bf22a10bbda51bba86d4c51fe9055deb91664b (diff)
bgpd: add some const
Add const to a couple of arguments in bgp_label utilities, and in a show function. Signed-off-by: Mark Stapp <mstapp@nvidia.com>
Diffstat (limited to 'bgpd/bgp_label.h')
-rw-r--r--bgpd/bgp_label.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_label.h b/bgpd/bgp_label.h
index d227cf7241..cafcc8e9c7 100644
--- a/bgpd/bgp_label.h
+++ b/bgpd/bgp_label.h
@@ -65,7 +65,7 @@ static inline int bgp_is_withdraw_label(mpls_label_t *label)
return 0;
}
-static inline int bgp_is_valid_label(mpls_label_t *label)
+static inline int bgp_is_valid_label(const mpls_label_t *label)
{
uint8_t *t = (uint8_t *)label;
if (!t)
@@ -99,7 +99,7 @@ static inline void bgp_unregister_for_label(struct bgp_dest *dest)
}
/* Label stream to value */
-static inline uint32_t label_pton(mpls_label_t *label)
+static inline uint32_t label_pton(const mpls_label_t *label)
{
uint8_t *t = (uint8_t *)label;
return ((((unsigned int)t[0]) << 12) | (((unsigned int)t[1]) << 4)