diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2021-09-21 21:04:13 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2021-09-21 21:04:13 +0200 |
commit | a0ff652261af4bebad0419aaf99ccea64c7ccf2e (patch) | |
tree | 075af89783e977d842b40d36d8c0d8eeedb8d1ae /src | |
parent | 9dfeeff1f11685987232f8af8fd1d3c29abb6579 (diff) | |
download | dns-a0ff652261af4bebad0419aaf99ccea64c7ccf2e.tar.gz |
list: tests
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; |