summaryrefslogtreecommitdiff
path: root/isisd/isis_tx_queue.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-10-17 15:27:12 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-19 13:14:45 -0400
commit74df8d6d9d665784b0273151fe04cd2f9ff5b353 (patch)
tree7b0d38ba7c6e9605634d40a64c4b904295d59d80 /isisd/isis_tx_queue.c
parent27fa33984bd6276942459a4c68abd15d04a9333e (diff)
*: 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 'isisd/isis_tx_queue.c')
-rw-r--r--isisd/isis_tx_queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/isisd/isis_tx_queue.c b/isisd/isis_tx_queue.c
index 32427628ad..fe67a3f4d1 100644
--- a/isisd/isis_tx_queue.c
+++ b/isisd/isis_tx_queue.c
@@ -58,18 +58,18 @@ static unsigned tx_queue_hash_key(void *p)
return jhash_1word(e->lsp->level, id_key);
}
-static int tx_queue_hash_cmp(const void *a, const void *b)
+static bool tx_queue_hash_cmp(const void *a, const void *b)
{
const struct isis_tx_queue_entry *ea = a, *eb = b;
if (ea->lsp->level != eb->lsp->level)
- return 0;
+ return false;
if (memcmp(ea->lsp->hdr.lsp_id, eb->lsp->hdr.lsp_id,
ISIS_SYS_ID_LEN + 2))
- return 0;
+ return false;
- return 1;
+ return true;
}
struct isis_tx_queue *isis_tx_queue_new(void *arg,