diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/list.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -10,12 +10,12 @@ int list_add( list_element_t** _root, void* _data ) { list_element_t** iter = _root; list_element_t* new_element = malloc( sizeof(list_element_t) ); - new_element->data = _data; - new_element->next = NULL; - if( !new_element ) return 1; + new_element->data = _data; + new_element->next = NULL; + while(*iter) iter = & (*iter)->next; |