aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/list.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/list.c b/src/list.c
index 6a0085f..133637b 100644
--- a/src/list.c
+++ b/src/list.c
@@ -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;