]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/qobj.c
Merge pull request #3485 from dslicenc/frr-reload-delete-vrf
[mirror_frr.git] / lib / qobj.c
index 5f450ca0d36430890acc59483031ed683dd21620..811645f3c33e337387be81f2789a68d2b551b819 100644 (file)
@@ -25,6 +25,7 @@
 #include "hash.h"
 #include "log.h"
 #include "qobj.h"
+#include "jhash.h"
 
 static pthread_rwlock_t nodes_lock;
 static struct hash *nodes = NULL;
@@ -35,7 +36,7 @@ static unsigned int qobj_key(void *data)
        return (unsigned int)node->nid;
 }
 
-static int qobj_cmp(const void *a, const void *b)
+static bool qobj_cmp(const void *a, const void *b)
 {
        const struct qobj_node *na = a, *nb = b;
        return na->nid == nb->nid;
@@ -97,7 +98,7 @@ void qobj_init(void)
 {
        if (!nodes) {
                pthread_rwlock_init(&nodes_lock, NULL);
-               nodes = hash_create(qobj_key, qobj_cmp, NULL);
+               nodes = hash_create_size(16, qobj_key, qobj_cmp, "QOBJ Hash");
        }
 }