From 4be4ae5a80cf03a061a8d4a28f7a41a668b17301 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 31 Dec 2016 11:25:23 -0800 Subject: Avoid C99 initialization; cmake 3.1/3.2 doesn't pass -std=c99? --- src/core/idhash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/idhash.c b/src/core/idhash.c index abd04e7e..785f3835 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -91,6 +91,7 @@ nni_hash_resize(nni_idhash *h) uint32_t oldsize; nni_idhash_entry *newents; nni_idhash_entry *oldents; + int i; if ((h->ih_load < h->ih_maxload) && (h->ih_load >= h->ih_minload)) { // No resize needed. @@ -126,7 +127,7 @@ nni_hash_resize(nni_idhash *h) h->ih_minload = 0; h->ih_maxload = 5; } - for (int i = 0; i < oldsize; i++) { + for (i = 0; i < oldsize; i++) { uint32_t index; if (oldents[i].ihe_val == NULL) { continue; -- cgit v1.2.3-70-g09d2