src/linked_list.c

changeset 399
8902fcd1e057
parent 398
8d506ed6c1c0
child 400
8cd274352419
equal deleted inserted replaced
398:8d506ed6c1c0 399:8902fcd1e057
98 98
99 struct cx_list_node_s *node = cxMalloc(allocator, sizeof(struct cx_list_node_s)); 99 struct cx_list_node_s *node = cxMalloc(allocator, sizeof(struct cx_list_node_s));
100 if (node == NULL) 100 if (node == NULL)
101 return 1; 101 return 1;
102 102
103 node->next = NULL;
104 node->data = elem;
105
103 int ret = cx_linked_list_add( 106 int ret = cx_linked_list_add(
104 (void **) &listdata->begin, 107 (void **) &listdata->begin,
105 (void **) &listdata->end, 108 (void **) &listdata->end,
106 offsetof(struct cx_list_node_s, next), 109 offsetof(struct cx_list_node_s, next),
107 offsetof(struct cx_list_node_s, prev), 110 offsetof(struct cx_list_node_s, prev),

mercurial