From: Jorge Boncompte [DTI2] Date: Wed, 31 Jul 2013 15:01:18 +0000 (+0000) Subject: lib: fix for dynamically grown hashes X-Git-Tag: frr-2.0-rc1~1622 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=6d729eeac91578dca29961e0e46f246f33c37f0c;p=mirror%2Ffrr.git lib: fix for dynamically grown hashes Fixes commit 97c84db00c (hash: dynamically grow hash table). The no_expand field it's not initialized and could make the hashes to never grow the table index. Signed-off-by: Jorge Boncompte [DTI2] Acked-by: Feng Lu Signed-off-by: David Lamparter --- diff --git a/lib/hash.c b/lib/hash.c index 987012a588..56e41fa826 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -36,6 +36,7 @@ hash_create_size (unsigned int size, unsigned int (*hash_key) (void *), hash->index = XCALLOC (MTYPE_HASH_INDEX, sizeof (struct hash_backet *) * size); hash->size = size; + hash->no_expand = 0; hash->hash_key = hash_key; hash->hash_cmp = hash_cmp; hash->count = 0;