diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-31 16:17:42 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-07-31 16:17:42 -0700 |
commit | c9a2aaf516ece95878e039c05bb333bac52a3cd8 (patch) | |
tree | d0a8a21585c0a34d031d13666dc63a99f79c5380 /lib/if_rmap.c | |
parent | de451b80ce76bd339c85a39cd815d720bf562003 (diff) | |
download | quagga-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/if_rmap.c')
-rw-r--r-- | lib/if_rmap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/if_rmap.c b/lib/if_rmap.c index e6f753c2..ddc62fd5 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -120,13 +120,12 @@ if_rmap_hash_make (void *data) } static int -if_rmap_hash_cmp (void *arg1, void* arg2) +if_rmap_hash_cmp (const void *arg1, const void* arg2) { - struct if_rmap *if_rmap1 = arg1; - struct if_rmap *if_rmap2 = arg2; - if (strcmp (if_rmap1->ifname, if_rmap2->ifname) == 0) - return 1; - return 0; + const struct if_rmap *if_rmap1 = arg1; + const struct if_rmap *if_rmap2 = arg2; + + return strcmp (if_rmap1->ifname, if_rmap2->ifname) == 0; } static struct if_rmap * |