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>
This commit is contained in:
Donald Sharp 2019-04-30 19:40:11 -04:00
parent 98d28ef55d
commit 62b4b3b68d
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);