summaryrefslogtreecommitdiff
path: root/libbb/llist.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-05 10:17:08 +0000
commit7d219aab70e6951ab82c27c202cac05016696723 (patch)
tree4c0679bfa391f71aee9b51505a5d3dc8f60a0cf7 /libbb/llist.c
parent8f8f268cfdecb4cabeb2e649a73afc7a485aeff5 (diff)
downloadbusybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.gz
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.tar.bz2
busybox-w32-7d219aab70e6951ab82c27c202cac05016696723.zip
build system overhaul
Diffstat (limited to 'libbb/llist.c')
-rw-r--r--libbb/llist.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libbb/llist.c b/libbb/llist.c
index 0e727c496..8bf89a595 100644
--- a/libbb/llist.c
+++ b/libbb/llist.c
@@ -13,7 +13,6 @@
13#include <stdlib.h> 13#include <stdlib.h>
14#include "libbb.h" 14#include "libbb.h"
15 15
16#ifdef L_llist_add_to
17/* Add data to the start of the linked list. */ 16/* Add data to the start of the linked list. */
18void llist_add_to(llist_t **old_head, void *data) 17void llist_add_to(llist_t **old_head, void *data)
19{ 18{
@@ -22,9 +21,7 @@ void llist_add_to(llist_t **old_head, void *data)
22 new_head->link = *old_head; 21 new_head->link = *old_head;
23 *old_head = new_head; 22 *old_head = new_head;
24} 23}
25#endif
26 24
27#ifdef L_llist_add_to_end
28/* Add data to the end of the linked list. */ 25/* Add data to the end of the linked list. */
29void llist_add_to_end(llist_t **list_head, void *data) 26void llist_add_to_end(llist_t **list_head, void *data)
30{ 27{
@@ -39,9 +36,7 @@ void llist_add_to_end(llist_t **list_head, void *data)
39 tail->link = new_item; 36 tail->link = new_item;
40 } 37 }
41} 38}
42#endif
43 39
44#ifdef L_llist_pop
45/* Remove first element from the list and return it */ 40/* Remove first element from the list and return it */
46void *llist_pop(llist_t **head) 41void *llist_pop(llist_t **head)
47{ 42{
@@ -57,9 +52,7 @@ void *llist_pop(llist_t **head)
57 52
58 return data; 53 return data;
59} 54}
60#endif
61 55
62#ifdef L_llist_free
63/* Recursively free all elements in the linked list. If freeit != NULL 56/* Recursively free all elements in the linked list. If freeit != NULL
64 * call it on each datum in the list */ 57 * call it on each datum in the list */
65void llist_free(llist_t *elm, void (*freeit)(void *data)) 58void llist_free(llist_t *elm, void (*freeit)(void *data))
@@ -69,4 +62,3 @@ void llist_free(llist_t *elm, void (*freeit)(void *data))
69 if (freeit) freeit(data); 62 if (freeit) freeit(data);
70 } 63 }
71} 64}
72#endif