]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_clist.h
bgpd: Use string length not sizeof the array
[mirror_frr.git] / bgpd / bgp_clist.h
index 9cf8a14a6ab529cae6e6d3e01392778244be7528..75a31611bae86b16dd771fadb1f20933f1301283 100644 (file)
@@ -173,7 +173,7 @@ lcommunity_list_match_delete(struct lcommunity *lcom,
 
 static inline uint32_t bgp_clist_hash_key(char *name)
 {
-       return jhash(name, sizeof(name), 0xdeadbeaf);
+       return jhash(name, strlen(name), 0xdeadbeaf);
 }
 
 #endif /* _QUAGGA_BGP_CLIST_H */