diff --git a/src/common/entity.c b/src/common/entity.c index 5e72aa4a8653c4fcdb2ef4546aa57ee3ce654e5f..52b37c1f379ab26d3d61af61b6a8beeeb8e21504 100644 --- a/src/common/entity.c +++ b/src/common/entity.c @@ -124,9 +124,7 @@ void entity_init(entity_t* entity, const char* name, const char* type) { entity->name = xstrdup(name); entity->type = xstrdup(type); - entity->data = xhash_init(_entity_data_identify, - (xhash_freefunc_t)_entity_data_destroy, - NULL, 0); + entity->data = xhash_init(_entity_data_identify, _entity_data_destroy); entity->nodes = list_create(_entity_node_destroy); entity->ptr = NULL; } diff --git a/src/common/layouts_mgr.c b/src/common/layouts_mgr.c index 8748eeb0c2521651d5c108d9fa998655d3449edb..dc0e5340e0e1c4fa0ac0a379f8063eaaa64a8d44 100644 --- a/src/common/layouts_mgr.c +++ b/src/common/layouts_mgr.c @@ -940,11 +940,11 @@ static void _layouts_mgr_init(layouts_mgr_t* mgr) mgr->init_done = true; _layouts_mgr_parse_global_conf(mgr); mgr->layouts = xhash_init(layout_hashable_identify_by_type, - (xhash_freefunc_t)_layout_free, NULL, 0); + _layout_free); mgr->entities = xhash_init(entity_hashable_identify, - (xhash_freefunc_t)_entity_free, NULL, 0); + _entity_free); mgr->keydefs = xhash_init(layouts_keydef_idfunc, - _layouts_keydef_free, NULL, 0); + _layouts_keydef_free); } /*****************************************************************************\ diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 566c9e215ac9ddddb78db6337177d78c2161d03e..500f3fdf6eb9652851a62f9545853871812bdbaf 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -653,8 +653,7 @@ extern struct node_record *create_node_record ( node_ptr = node_record_table_ptr + (node_record_count++); node_ptr->name = xstrdup(node_name); if (!node_hash_table) - node_hash_table = xhash_init(_node_record_hash_identity, - NULL, NULL, 0); + node_hash_table = xhash_init(_node_record_hash_identity, NULL); xhash_add(node_hash_table, node_ptr); node_ptr->config_ptr = config_ptr; @@ -949,8 +948,7 @@ extern void rehash_node (void) struct node_record *node_ptr = node_record_table_ptr; xhash_free (node_hash_table); - node_hash_table = xhash_init(_node_record_hash_identity, - NULL, NULL, 0); + node_hash_table = xhash_init(_node_record_hash_identity, NULL); for (i = 0; i < node_record_count; i++, node_ptr++) { if ((node_ptr->name == NULL) || (node_ptr->name[0] == '\0')) diff --git a/src/common/xhash.c b/src/common/xhash.c index 3d57324dc4c39bd4d6fe8de544a063f82d70a13e..4e1bcc47a0c935921159b0ed4ccc6593fc15f42d 100644 --- a/src/common/xhash.c +++ b/src/common/xhash.c @@ -73,10 +73,7 @@ struct xhash_st { key */ }; -xhash_t* xhash_init(xhash_idfunc_t idfunc, - xhash_freefunc_t freefunc, - xhash_hashfunc_t hashfunc, - uint32_t table_size) +xhash_t *xhash_init(xhash_idfunc_t idfunc, xhash_freefunc_t freefunc) { xhash_t* table = NULL; if (!idfunc) diff --git a/src/common/xhash.h b/src/common/xhash.h index e18aba2694625aad98a25df12a78925e40a9afcf..4f75ee008611f0786e36d52d603f23a4ac5bd7ec 100644 --- a/src/common/xhash.h +++ b/src/common/xhash.h @@ -80,10 +80,7 @@ typedef void (*xhash_freefunc_t)(void* item); * * @returns the newly allocated hash table. Must be freed with xhash_free. */ -xhash_t* xhash_init(xhash_idfunc_t idfunc, - xhash_freefunc_t freefunc, - xhash_hashfunc_t hashfunc, /* Currently: should be NULL */ - uint32_t table_size); /* Currently: unused */ +xhash_t *xhash_init(xhash_idfunc_t idfunc, xhash_freefunc_t freefunc); /** @returns an item from a key searching through the hash table. NULL if not * found.