Fix Coverity Scan CID 21929 (Using uninitialized value newtbl.num_elements when calling hashtable_insert.)
This commit is contained in:
@@ -358,6 +358,7 @@ hashtable_rc_t hashtable_resize(hash_table_t *const hashtblP, const hash_size_t
|
||||
|
||||
newtbl.size = sizeP;
|
||||
newtbl.hashfunc = hashtblP->hashfunc;
|
||||
newtbl.num_elements = 0;
|
||||
|
||||
if(!(newtbl.nodes=calloc(sizeP, sizeof(hash_node_t *)))) return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user