diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-05 08:14:27 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-05 08:14:27 -0600 |
commit | cc3a585e37cf58b61cbea599cc4de93cf713834b (patch) | |
tree | 8f73af6ff3922acdefeb7a8475e364f1945a48a3 /lib9p/map.h | |
parent | 4f7cf6b416ccede492ace64533ab35a9a289f463 (diff) |
compiles
Diffstat (limited to 'lib9p/map.h')
-rw-r--r-- | lib9p/map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib9p/map.h b/lib9p/map.h index ea9cdb6..833f4f5 100644 --- a/lib9p/map.h +++ b/lib9p/map.h @@ -28,8 +28,8 @@ #define MAP_KV(TNAME) CAT3(_,TNAME,_kv) #define MAP_METHOD(TNAME, MNAME) CAT3(TNAME,_,MNAME) #define MAP_FOREACH(m, k, v) \ - for (size_t i = 0, typeof(m->items[0].key) k, typeof(&m->items[0].val) v; i < ARRAY_LEN(m->items); i++) \ - if ( ({ k = m->items[i].key; v = &m->items[i].val; m->items[i].set; }) ) + for (size_t i = 0; i < ARRAY_LEN((m)->items); i++) \ + if ( ({ k = (m)->items[i].key; v = &(m)->items[i].val; (m)->items[i].set; }) ) #endif /* This implementation is just an array that we brute-force search |