summaryrefslogtreecommitdiffstats
path: root/lib/hash.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-31 16:17:42 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-07-31 16:17:42 -0700
commitc9a2aaf516ece95878e039c05bb333bac52a3cd8 (patch)
treed0a8a21585c0a34d031d13666dc63a99f79c5380 /lib/hash.c
parentde451b80ce76bd339c85a39cd815d720bf562003 (diff)
downloadquagga-c9a2aaf516ece95878e039c05bb333bac52a3cd8.tar.bz2
quagga-c9a2aaf516ece95878e039c05bb333bac52a3cd8.tar.xz
Make hash compare functions take const args
The hash compare function should not be modifiying its args
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 76bf802a..3884051f 100644
--- a/lib/hash.c
+++ b/lib/hash.c
@@ -27,7 +27,7 @@
/* Allocate a new hash. */
struct hash *
hash_create_size (unsigned int size, unsigned int (*hash_key) (void *),
- int (*hash_cmp) (void *, void *))
+ int (*hash_cmp) (const void *, const void *))
{
struct hash *hash;
@@ -46,7 +46,7 @@ hash_create_size (unsigned int size, unsigned int (*hash_key) (void *),
/* Allocate a new hash with default hash size. */
struct hash *
hash_create (unsigned int (*hash_key) (void *),
- int (*hash_cmp) (void *, void *))
+ int (*hash_cmp) (const void *, const void *))
{
return hash_create_size (HASHTABSIZE, hash_key, hash_cmp);
}