diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-17 21:27:12 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-19 19:14:45 +0200 |
commit | 74df8d6d9d665784b0273151fe04cd2f9ff5b353 (patch) | |
tree | 7b0d38ba7c6e9605634d40a64c4b904295d59d80 /nhrpd/nhrp_cache.c | |
parent | *: Fixup to use proper list_cmp functions (diff) | |
download | frr-74df8d6d9d665784b0273151fe04cd2f9ff5b353.tar.xz frr-74df8d6d9d665784b0273151fe04cd2f9ff5b353.zip |
*: Replace hash_cmp function return value to a bool
The ->hash_cmp and linked list ->cmp functions were sometimes
being used interchangeably and this really is not a good
thing. So let's modify the hash_cmp function pointer to return
a boolean and convert everything to use the new syntax.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'nhrpd/nhrp_cache.c')
-rw-r--r-- | nhrpd/nhrp_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nhrpd/nhrp_cache.c b/nhrpd/nhrp_cache.c index f3a33eb28..1316a4aad 100644 --- a/nhrpd/nhrp_cache.c +++ b/nhrpd/nhrp_cache.c @@ -36,10 +36,12 @@ static unsigned int nhrp_cache_protocol_key(void *peer_data) return sockunion_hash(&p->remote_addr); } -static int nhrp_cache_protocol_cmp(const void *cache_data, const void *key_data) +static bool nhrp_cache_protocol_cmp(const void *cache_data, + const void *key_data) { const struct nhrp_cache *a = cache_data; const struct nhrp_cache *b = key_data; + return sockunion_same(&a->remote_addr, &b->remote_addr); } |