projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb0ca66
)
rc/utils_llist.c: Fix a bug in llist_prepend.
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
d8694e3
..
d5db9dc
100644
(file)
--- a/
src/utils_llist.c
+++ b/
src/utils_llist.c
@@
-110,6
+110,9
@@
void llist_prepend (llist_t *l, llentry_t *e)
{
e->next = l->head;
l->head = e;
+
+ if (l->tail == NULL)
+ l->tail = e;
}
void llist_remove (llist_t *l, llentry_t *e)