Skip to content

Commit

Permalink
zlist_remove allows for iterative removal of items
Browse files Browse the repository at this point in the history
  • Loading branch information
xekoukou committed Mar 21, 2013
1 parent cb9839c commit cf1f485
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/zlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,11 @@ zlist_remove (zlist_t *self, void *item)
if (node->next == NULL)
self->tail = prev;

if (self->cursor == node)
self->cursor = prev;

free (node);
self->size--;
self->cursor = NULL;
}
}

Expand Down

0 comments on commit cf1f485

Please sign in to comment.