summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: eb0ca66)
raw | patch | inline | side by side (parent: eb0ca66)
author | Luke Heberling <collectd@c-ware.com> | |
Thu, 13 Dec 2007 07:06:26 +0000 (08:06 +0100) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 13 Dec 2007 07:06:26 +0000 (08:06 +0100) |
Copy the element to the tail if it's the first element.
src/utils_llist.c | patch | blob | history |
diff --git a/src/utils_llist.c b/src/utils_llist.c
index d8694e3f6770fb5cba12d48af9a4c15d64a04e35..d5db9dc03abbab0d84df4676ec12a4dffea409e2 100644 (file)
--- a/src/utils_llist.c
+++ b/src/utils_llist.c
{
e->next = l->head;
l->head = e;
+
+ if (l->tail == NULL)
+ l->tail = e;
}
void llist_remove (llist_t *l, llentry_t *e)