X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Futils_llist.c;h=7fae025d62233ca51613268369239c43f516f973;hb=83aa9c9e37ade801f9e4d99f2f7809f361aaec2c;hp=f7e03c239b9889d4f62ecb62ae34488c868de2eb;hpb=f46cf590f7e0a25fe5f826b762766f39e1f3a1f6;p=collectd.git diff --git a/src/utils_llist.c b/src/utils_llist.c index f7e03c23..7fae025d 100644 --- a/src/utils_llist.c +++ b/src/utils_llist.c @@ -106,6 +106,10 @@ void llist_prepend (llist_t *l, llentry_t *e) { e->next = l->head; l->head = e; + + if (l->tail == NULL) + l->tail = e; + ++(l->size); }