[lib] hash compare function arguments ought to be const qualified
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com>
* lib/hash.h: (struct hash) Hash comparator callback really
ought to treat storage behind arguments as constant - a compare
function with side-effects would be evil.
* */*.c: Adjust comparator functions similarly, thus fixing at least
a few compiler warnings about const qualifier being dropped.
Signed-off-by: Paul Jakma <paul@quagga.net>
diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c
index 592b810..1cafdb3 100644
--- a/bgpd/bgp_community.c
+++ b/bgpd/bgp_community.c
@@ -633,5 +633,6 @@
void
community_init (void)
{
- comhash = hash_create (community_hash_make, community_cmp);
+ comhash = hash_create ((unsigned int (*) (void *))community_hash_make,
+ (int (*) (const void *, const void *))community_cmp);
}