aboutsummaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:04:13 +0200
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2021-09-21 21:04:13 +0200
commita0ff652261af4bebad0419aaf99ccea64c7ccf2e (patch)
tree075af89783e977d842b40d36d8c0d8eeedb8d1ae /src/list.c
parent9dfeeff1f11685987232f8af8fd1d3c29abb6579 (diff)
downloaddns-a0ff652261af4bebad0419aaf99ccea64c7ccf2e.tar.gz
list: tests
Diffstat (limited to 'src/list.c')
-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;