Commit 4aa4ea06 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 21929 (Using uninitialized value newtbl.num_elements...

Fix Coverity Scan CID 21929 (Using uninitialized value newtbl.num_elements when calling hashtable_insert.)
parent 33c28259
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment