diff --git a/src/utils_llist.c b/src/utils_llist.c
index 2e04152f9ec9db12dac5d55ae03af644998666ed..a81503578bc28b8e56da29d17dc72937788a6aa2 100644 (file)
--- a/src/utils_llist.c
+++ b/src/utils_llist.c
l->head = e;
}
l->head = e;
}
+void llist_remove (llist_t *l, llentry_t *e)
+{
+ llentry_t *prev;
+
+ prev = l->head;
+ while ((prev != NULL) && (prev->next != e))
+ prev = prev->next;
+
+ if (prev != NULL)
+ prev->next = e->next;
+ if (l->head == e)
+ l->head = e->next;
+ if (l->tail == e)
+ l->tail = prev;
+}
+
llentry_t *llist_search (llist_t *l, const char *key)
{
llentry_t *e;
llentry_t *llist_search (llist_t *l, const char *key)
{
llentry_t *e;