]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_aspath.c
lib: hashing functions should take const arguments
[mirror_frr.git] / bgpd / bgp_aspath.c
index 92c37fabd23483274b1e47adf9616aab38eda2f1..05577cb8bdb0779847fd7f04d321dc5398d9bbad 100644 (file)
@@ -2008,13 +2008,13 @@ struct aspath *aspath_str2aspath(const char *str)
 }
 
 /* Make hash value by raw aspath data. */
-unsigned int aspath_key_make(void *p)
+unsigned int aspath_key_make(const void *p)
 {
-       struct aspath *aspath = (struct aspath *)p;
+       const struct aspath *aspath = p;
        unsigned int key = 0;
 
        if (!aspath->str)
-               aspath_str_update(aspath, false);
+               aspath_str_update((struct aspath *)aspath, false);
 
        key = jhash(aspath->str, aspath->str_len, 2334325);