diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-04-30 19:40:11 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-05-01 20:28:57 -0400 |
| commit | 6701b1b7e749af853f9b9363ef507189d10ef6d2 (patch) | |
| tree | 41d115f44809d9c955ff595e77943e6c9d03dcb5 | |
| parent | a07f484614e0e9cc92afaf4bf58e6f6507fdbed4 (diff) | |
lib: Make prefix_hash_key accept a const
We should not be modifying the pointer for the prefix_hash_key
function, make it a const so that we can use it elsewhere.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
| -rw-r--r-- | lib/prefix.c | 2 | ||||
| -rw-r--r-- | lib/prefix.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 6b91969218..d2a4c3a432 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -1543,7 +1543,7 @@ char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size) return ptr; } -unsigned prefix_hash_key(void *pp) +unsigned prefix_hash_key(const void *pp) { struct prefix copy; diff --git a/lib/prefix.h b/lib/prefix.h index d3c387e102..d57b43dac6 100644 --- a/lib/prefix.h +++ b/lib/prefix.h @@ -466,7 +466,7 @@ extern int is_zero_mac(struct ethaddr *mac); extern int prefix_str2mac(const char *str, struct ethaddr *mac); extern char *prefix_mac2str(const struct ethaddr *mac, char *buf, int size); -extern unsigned prefix_hash_key(void *pp); +extern unsigned prefix_hash_key(const void *pp); extern int str_to_esi(const char *str, esi_t *esi); extern char *esi_to_str(const esi_t *esi, char *buf, int size); |
