summaryrefslogtreecommitdiff
path: root/libmisc/map.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-22 18:51:59 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-05-06 11:53:17 -0600
commit24e5d0ec1219e2dbb4b9510ef20833092a2b3871 (patch)
tree01bbcc34c6190fa1c35b2625e9ba1744b1447606 /libmisc/map.c
parentf09b7435b3a5222597d27238226d23ec0cbd5bd2 (diff)
wip: Build with -Wconversionlukeshu/safe-conversion
I think this found a real bug in the dhcp packet parser. I don't think anything called lib9p_str{,n}() values that could be big enough, but their bounds-checking was broken.
Diffstat (limited to 'libmisc/map.c')
-rw-r--r--libmisc/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmisc/map.c b/libmisc/map.c
index d703966..f354f07 100644
--- a/libmisc/map.c
+++ b/libmisc/map.c
@@ -211,7 +211,7 @@ bool _map_iter_next(struct _map_iter *state) {
struct _map_kv_list_node *old_kv = state->kv;
state->kv = old_kv->rear;
- old_kv->val.flags &= ~FLAG_ITER;
+ old_kv->val.flags &= flip8(FLAG_ITER);
if (old_kv->val.flags & FLAG_DEL) {
dlist_remove(&state->m->buckets[state->i], old_kv);
free(old_kv);