summaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-07-14 22:25:30 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-07-14 22:25:30 +0200
commitd6a4ca14340d6618b782ec04e86281f9a1c2653e (patch)
treee51b648742ab91cfb2813eb2215674ec66e7d098 /degesch.c
parent955552f4fac26c936d1c2951ee0f8fd214b401ef (diff)
downloadxK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.tar.gz
xK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.tar.xz
xK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.zip
Bump liberty, fix map iterators
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/degesch.c b/degesch.c
index c4a7a43..78a5f66 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6567,14 +6567,12 @@ server_remove (struct app_context *ctx, struct server *s)
if (s->buffer)
buffer_remove_safe (ctx, s->buffer);
- struct str_map_iter iter;
- str_map_iter_init (&iter, &s->irc_buffer_map);
- struct buffer *buffer, *next = str_map_iter_next (&iter);
- for (buffer = next; buffer; buffer = next)
- {
- next = str_map_iter_next (&iter);
+ struct str_map_unset_iter iter;
+ str_map_unset_iter_init (&iter, &s->irc_buffer_map);
+ struct buffer *buffer;
+ while ((buffer = str_map_unset_iter_next (&iter)))
buffer_remove_safe (ctx, buffer);
- }
+ str_map_unset_iter_free (&iter);
hard_assert (!s->buffer);
hard_assert (!s->irc_buffer_map.len);