summaryrefslogtreecommitdiffstats
path: root/lib/hash.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2013-07-31 15:01:18 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2014-04-01 17:13:02 +0200
commit6d729eeac91578dca29961e0e46f246f33c37f0c (patch)
tree38727ce4ac7c9d6e06298e374ed1a526fe8effb3 /lib/hash.c
parent4d474fa3297c0d5d632e2c0bff6ccb0edbedaa5d (diff)
downloadquagga-6d729eeac91578dca29961e0e46f246f33c37f0c.tar.bz2
quagga-6d729eeac91578dca29961e0e46f246f33c37f0c.tar.xz
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] <jorge@dti2.net> Acked-by: Feng Lu <lu.feng@6wind.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/hash.c')
-rw-r--r--lib/hash.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 987012a5..56e41fa8 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;