diff options
author | chris <> | 2002-03-24 17:27:12 +0000 |
---|---|---|
committer | chris <> | 2002-03-24 17:27:12 +0000 |
commit | 1388f3adf69c11bbad0689e0dbdcd579fc22a855 (patch) | |
tree | a6d516c5006806947dd43f141eb1ce0c74bec62e /sorted_list.c | |
parent | 3004ea063cbb186a63af99a2e13d7cb09f23360d (diff) | |
download | iftop-1388f3adf69c11bbad0689e0dbdcd579fc22a855.zip |
""
Diffstat (limited to 'sorted_list.c')
-rw-r--r-- | sorted_list.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sorted_list.c b/sorted_list.c index 50d0b06..478b019 100644 --- a/sorted_list.c +++ b/sorted_list.c @@ -6,6 +6,7 @@ #include <stdlib.h> #include <stdio.h> #include "sorted_list.h" +#include "iftop.h" void sorted_list_insert(sorted_list_type* list, void* item) { @@ -17,11 +18,7 @@ void sorted_list_insert(sorted_list_type* list, void* item) { p = p->next; } - node = (sorted_list_node*)malloc(sizeof(sorted_list_node)); - if(node == NULL) { - fprintf(stderr,"Out of memory\n"); - exit(1); - } + node = xmalloc(sizeof *node); node->next = p->next; node->data = item; |