diff options
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); |