diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2015-07-14 22:25:30 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2015-07-14 22:25:30 +0200 |
commit | d6a4ca14340d6618b782ec04e86281f9a1c2653e (patch) | |
tree | e51b648742ab91cfb2813eb2215674ec66e7d098 /degesch.c | |
parent | 955552f4fac26c936d1c2951ee0f8fd214b401ef (diff) | |
download | xK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.tar.gz xK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.tar.xz xK-d6a4ca14340d6618b782ec04e86281f9a1c2653e.zip |
Bump liberty, fix map iterators
Diffstat (limited to 'degesch.c')
-rw-r--r-- | degesch.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -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); |