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), |