summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-12-31 01:00:22 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-12-31 01:00:22 +0100
commit0ea93b03c028cb5ac0b6d3bbe0bbb76aca7b8436 (patch)
tree664d95864212338a2369f5e168600e6b43918aec
parente2d634662178d985b90a06deafbe6f24d4ecb519 (diff)
Fix for-loop syntax
-rw-r--r--src/gehashmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gehashmap.h b/src/gehashmap.h
index 5d29b89..600666e 100644
--- a/src/gehashmap.h
+++ b/src/gehashmap.h
@@ -142,7 +142,7 @@
\
hash = n##_key_hash(key) % map->capacity; \
entry = map->entries[hash]; \
- for (entry != NULL; entry = entry->next) { \
+ for (; entry != NULL; entry = entry->next) { \
if (n##_key_iseq(entry->key, key)) { \
entry->val = val; \
return 0; \
@@ -172,7 +172,7 @@
size_t hash = n##_key_hash(key) % map->capacity; \
struct n##_entry *entry = map->entries[hash]; \
\
- for (entry != NULL; entry = entry->next) { \
+ for (; entry != NULL; entry = entry->next) { \
if (n##_key_iseq(entry->key, key)) { \
if (val != NULL) \
*val = entry->val; \
@@ -213,7 +213,7 @@
return 0; \
} \
\
- for (entry->next != NULL; entry = entry->next) { \
+ for (; entry->next != NULL; entry = entry->next) { \
if (n##_key_iseq(entry->next->key, key)) { \
struct n##_entry *next = entry->next; \
entry->next = next->next; \