summaryrefslogtreecommitdiff
path: root/hashmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'hashmap.h')
-rw-r--r--hashmap.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hashmap.h b/hashmap.h
index 79ae9f80de..b011b394fe 100644
--- a/hashmap.h
+++ b/hashmap.h
@@ -168,7 +168,7 @@ struct hashmap_entry {
* argument `keydata`, respectively. Otherwise, `keydata` is NULL.
*
* When it is too expensive to allocate a user entry (either because it is
- * large or varialbe sized, such that it is not on the stack), then the
+ * large or variable sized, such that it is not on the stack), then the
* relevant data to check for equality should be passed via `keydata`.
* In this case `key` can be a stripped down version of the user key data
* or even just a hashmap_entry having the correct hash.
@@ -449,7 +449,8 @@ static inline struct hashmap_entry *hashmap_iter_first(struct hashmap *map,
* containing a @member which is a "struct hashmap_entry"
*/
#define hashmap_for_each_entry(map, iter, var, member) \
- for (var = hashmap_iter_first_entry_offset(map, iter, \
+ for (var = NULL, /* for systems without typeof */ \
+ var = hashmap_iter_first_entry_offset(map, iter, \
OFFSETOF_VAR(var, member)); \
var; \
var = hashmap_iter_next_entry_offset(iter, \