adds missing assignments for new list node

Sun, 07 Feb 2021 20:05:26 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Feb 2021 20:05:26 +0100
changeset 399
8902fcd1e057
parent 398
8d506ed6c1c0
child 400
8cd274352419

adds missing assignments for new list node

src/linked_list.c file | annotate | diff | comparison | revisions
--- a/src/linked_list.c	Sun Feb 07 19:42:12 2021 +0100
+++ b/src/linked_list.c	Sun Feb 07 20:05:26 2021 +0100
@@ -100,6 +100,9 @@
     if (node == NULL)
         return 1;
 
+    node->next = NULL;
+    node->data = elem;
+
     int ret = cx_linked_list_add(
             (void **) &listdata->begin,
             (void **) &listdata->end,

mercurial