diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-06-19 22:49:44 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2017-07-01 19:18:37 -0400 |
| commit | dfd19ccc3a21b18fb09cecff5d87d20a0adbafe3 (patch) | |
| tree | ad5f5e7ebf2912329bebbc8f87303aa71b61d7b5 /lib | |
| parent | 6f6f00107e72cc9c01a6604ff514a5b25d52106d (diff) | |
*: update hash_create(), hash_create_size()
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/command.c | 2 | ||||
| -rw-r--r-- | lib/distribute.c | 3 | ||||
| -rw-r--r-- | lib/frr_pthread.c | 2 | ||||
| -rw-r--r-- | lib/if_rmap.c | 2 | ||||
| -rw-r--r-- | lib/qobj.c | 2 | ||||
| -rw-r--r-- | lib/routemap.c | 6 | ||||
| -rw-r--r-- | lib/thread.c | 2 |
7 files changed, 10 insertions, 9 deletions
diff --git a/lib/command.c b/lib/command.c index 77fada1636..de8899687c 100644 --- a/lib/command.c +++ b/lib/command.c @@ -233,7 +233,7 @@ install_node (struct cmd_node *node, // add start node struct cmd_token *token = cmd_token_new (START_TKN, CMD_ATTR_NORMAL, NULL, NULL); graph_new_node (node->cmdgraph, token, (void (*)(void *)) &cmd_token_del); - node->cmd_hash = hash_create (cmd_hash_key, cmd_hash_cmp); + node->cmd_hash = hash_create (cmd_hash_key, cmd_hash_cmp, NULL); } /** diff --git a/lib/distribute.c b/lib/distribute.c index c771f018c2..79d7b18ff5 100644 --- a/lib/distribute.c +++ b/lib/distribute.c @@ -522,7 +522,8 @@ void distribute_list_init (int node) { disthash = hash_create (distribute_hash_make, - (int (*) (const void *, const void *)) distribute_cmp); + (int (*) (const void *, const void *)) + distribute_cmp, NULL); /* vtysh command-extraction doesn't grok install_element(node, ) */ if (node == RIP_NODE) { diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c index 614c722be1..4b9bed4524 100644 --- a/lib/frr_pthread.c +++ b/lib/frr_pthread.c @@ -55,7 +55,7 @@ void frr_pthread_init() pthread_mutex_lock(&pthread_table_mtx); { pthread_table = - hash_create(pthread_table_hash_key, pthread_table_hash_cmp); + hash_create(pthread_table_hash_key, pthread_table_hash_cmp, NULL); } pthread_mutex_unlock(&pthread_table_mtx); } diff --git a/lib/if_rmap.c b/lib/if_rmap.c index f9c6a55d7b..32bebd67ff 100644 --- a/lib/if_rmap.c +++ b/lib/if_rmap.c @@ -316,7 +316,7 @@ if_rmap_reset () void if_rmap_init (int node) { - ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp); + ifrmaphash = hash_create (if_rmap_hash_make, if_rmap_hash_cmp, NULL); if (node == RIPNG_NODE) { } else if (node == RIP_NODE) { install_element (RIP_NODE, &if_rmap_cmd); diff --git a/lib/qobj.c b/lib/qobj.c index 4cf7fbca7b..8fa8163970 100644 --- a/lib/qobj.c +++ b/lib/qobj.c @@ -97,7 +97,7 @@ void qobj_init (void) if (!nodes) { pthread_rwlock_init (&nodes_lock, NULL); - nodes = hash_create (qobj_key, qobj_cmp); + nodes = hash_create (qobj_key, qobj_cmp, NULL); } } diff --git a/lib/routemap.c b/lib/routemap.c index 9eb28888ad..caba8afd71 100644 --- a/lib/routemap.c +++ b/lib/routemap.c @@ -1767,7 +1767,7 @@ route_map_dep_hash_alloc(void *p) dep_entry = XCALLOC(MTYPE_ROUTE_MAP_DEP, sizeof(struct route_map_dep)); dep_entry->dep_name = XSTRDUP(MTYPE_ROUTE_MAP_NAME, dep_name); dep_entry->dep_rmap_hash = hash_create(route_map_dep_hash_make_key, - route_map_rmap_hash_cmp); + route_map_rmap_hash_cmp, NULL); dep_entry->this_hash = NULL; return((void *)dep_entry); @@ -2986,11 +2986,11 @@ route_map_init (void) /* Make vector for match and set. */ route_match_vec = vector_init (1); route_set_vec = vector_init (1); - route_map_master_hash = hash_create(route_map_hash_key_make, route_map_hash_cmp); + route_map_master_hash = hash_create(route_map_hash_key_make, route_map_hash_cmp, NULL); for (i = 1; i < ROUTE_MAP_DEP_MAX; i++) route_map_dep_hash[i] = hash_create(route_map_dep_hash_make_key, - route_map_dep_hash_cmp); + route_map_dep_hash_cmp, NULL); cmd_variable_handler_register(rmap_var_handlers); diff --git a/lib/thread.c b/lib/thread.c index 71b0bb2aed..4e72d4c96f 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -388,7 +388,7 @@ thread_master_create (const char *name) rv->cpu_record = hash_create ((unsigned int (*) (void *))cpu_record_hash_key, (int (*) (const void *, const void *)) - cpu_record_hash_cmp); + cpu_record_hash_cmp, NULL); /* Initialize the timer queues */ |
