]> git.proxmox.com Git - mirror_frr.git/commitdiff
lib: Make prefix_hash_key accept a const
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 30 Apr 2019 23:40:11 +0000 (19:40 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 May 2019 00:28:57 +0000 (20:28 -0400)
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>
lib/prefix.c
lib/prefix.h

index 6b91969218fdb0c704e179dfc0a880342b2c69e5..d2a4c3a432351193e2c24fcb4ecb40784924ad78 100644 (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;
 
index d3c387e102945e9df619485f6e0db9749e0d250a..d57b43dac689e10d377a7afbef3510daf230b0ee 100644 (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);