aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2016-12-31 11:25:23 -0800
committerGarrett D'Amore <garrett@damore.org>2016-12-31 11:25:23 -0800
commit4be4ae5a80cf03a061a8d4a28f7a41a668b17301 (patch)
tree0e85625cbbd5541cd066b05adbbd18b6d019bdd3 /src/core
parenta432e040d620e7d1315018ea6717f81e61463608 (diff)
downloadnng-4be4ae5a80cf03a061a8d4a28f7a41a668b17301.tar.gz
nng-4be4ae5a80cf03a061a8d4a28f7a41a668b17301.tar.bz2
nng-4be4ae5a80cf03a061a8d4a28f7a41a668b17301.zip
Avoid C99 initialization; cmake 3.1/3.2 doesn't pass -std=c99?
Diffstat (limited to 'src/core')
-rw-r--r--src/core/idhash.c3
1 files changed, 2 insertions, 1 deletions
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;