diff options
| author | Rob Landley <rob@landley.net> | 2006-05-26 23:00:10 +0000 |
|---|---|---|
| committer | Rob Landley <rob@landley.net> | 2006-05-26 23:00:10 +0000 |
| commit | 5edc10275ec86f6ce6af97a8e2e5eeccb3a2e8cb (patch) | |
| tree | 0f5d3abe8e3c94c516037f1021cb356866e72f13 | |
| parent | d765ee5d0fb3a8077dcf4b1520321089aa4104ce (diff) | |
| download | busybox-w32-5edc10275ec86f6ce6af97a8e2e5eeccb3a2e8cb.tar.gz busybox-w32-5edc10275ec86f6ce6af97a8e2e5eeccb3a2e8cb.tar.bz2 busybox-w32-5edc10275ec86f6ce6af97a8e2e5eeccb3a2e8cb.zip | |
Slight sanity fix: data is void *, not char *. And it's called data
almost everywhere, so be consistent.
| -rw-r--r-- | include/libbb.h | 4 | ||||
| -rw-r--r-- | libbb/llist.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h index 64c91b170..93b29c6ae 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -84,8 +84,8 @@ typedef struct llist_s { | |||
| 84 | char *data; | 84 | char *data; |
| 85 | struct llist_s *link; | 85 | struct llist_s *link; |
| 86 | } llist_t; | 86 | } llist_t; |
| 87 | extern llist_t *llist_add_to(llist_t *old_head, char *new_item); | 87 | extern llist_t *llist_add_to(llist_t *old_head, void *data); |
| 88 | extern llist_t *llist_add_to_end(llist_t *list_head, char *data); | 88 | extern llist_t *llist_add_to_end(llist_t *list_head, void *data); |
| 89 | extern void *llist_pop(llist_t **elm); | 89 | extern void *llist_pop(llist_t **elm); |
| 90 | extern void llist_free(llist_t *elm, void (*freeit)(void *data)); | 90 | extern void llist_free(llist_t *elm, void (*freeit)(void *data)); |
| 91 | 91 | ||
diff --git a/libbb/llist.c b/libbb/llist.c index 842e8f7bb..dd80436c6 100644 --- a/libbb/llist.c +++ b/libbb/llist.c | |||
| @@ -14,12 +14,12 @@ | |||
| 14 | 14 | ||
| 15 | #ifdef L_llist_add_to | 15 | #ifdef L_llist_add_to |
| 16 | /* Add data to the start of the linked list. */ | 16 | /* Add data to the start of the linked list. */ |
| 17 | llist_t *llist_add_to(llist_t *old_head, char *new_item) | 17 | llist_t *llist_add_to(llist_t *old_head, void *data) |
| 18 | { | 18 | { |
| 19 | llist_t *new_head; | 19 | llist_t *new_head; |
| 20 | 20 | ||
| 21 | new_head = xmalloc(sizeof(llist_t)); | 21 | new_head = xmalloc(sizeof(llist_t)); |
| 22 | new_head->data = new_item; | 22 | new_head->data = data; |
| 23 | new_head->link = old_head; | 23 | new_head->link = old_head; |
| 24 | 24 | ||
| 25 | return (new_head); | 25 | return (new_head); |
| @@ -28,7 +28,7 @@ llist_t *llist_add_to(llist_t *old_head, char *new_item) | |||
| 28 | 28 | ||
| 29 | #ifdef L_llist_add_to_end | 29 | #ifdef L_llist_add_to_end |
| 30 | /* Add data to the end of the linked list. */ | 30 | /* Add data to the end of the linked list. */ |
| 31 | llist_t *llist_add_to_end(llist_t *list_head, char *data) | 31 | llist_t *llist_add_to_end(llist_t *list_head, void *data) |
| 32 | { | 32 | { |
| 33 | llist_t *new_item; | 33 | llist_t *new_item; |
| 34 | 34 | ||
