diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-25 00:06:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-25 00:06:29 +0000 |
commit | 043d70fcdfa50c93dc826069aa5836206f8e3e2d (patch) | |
tree | af76e68933639c821d1e632ae54b34215ac73945 /lib/llist.c | |
parent | 4f7e95896934df81df2a7f49e0a4f6b775fcb308 (diff) | |
download | curl-043d70fcdfa50c93dc826069aa5836206f8e3e2d.tar.gz |
Use plain structs and not typedef'ed ones in the hash and linked-list code.
Diffstat (limited to 'lib/llist.c')
-rw-r--r-- | lib/llist.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/llist.c b/lib/llist.c index 961848692..ae5a466c6 100644 --- a/lib/llist.c +++ b/lib/llist.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -33,7 +33,7 @@ #include "memdebug.h" void -Curl_llist_init(curl_llist *l, curl_llist_dtor dtor) +Curl_llist_init(struct curl_llist *l, curl_llist_dtor dtor) { l->size = 0; l->dtor = dtor; @@ -41,12 +41,12 @@ Curl_llist_init(curl_llist *l, curl_llist_dtor dtor) l->tail = NULL; } -curl_llist * +struct curl_llist * Curl_llist_alloc(curl_llist_dtor dtor) { - curl_llist *list; + struct curl_llist *list; - list = (curl_llist *)malloc(sizeof(curl_llist)); + list = (struct curl_llist *)malloc(sizeof(struct curl_llist)); if(NULL == list) return NULL; @@ -59,10 +59,11 @@ Curl_llist_alloc(curl_llist_dtor dtor) * Curl_llist_insert_next() returns 1 on success and 0 on failure. */ int -Curl_llist_insert_next(curl_llist *list, curl_llist_element *e, const void *p) +Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e, + const void *p) { - curl_llist_element *ne = - (curl_llist_element *) malloc(sizeof(curl_llist_element)); + struct curl_llist_element *ne = + (struct curl_llist_element *) malloc(sizeof(struct curl_llist_element)); if(!ne) return 0; @@ -91,7 +92,8 @@ Curl_llist_insert_next(curl_llist *list, curl_llist_element *e, const void *p) } int -Curl_llist_remove(curl_llist *list, curl_llist_element *e, void *user) +Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, + void *user) { if (e == NULL || list->size == 0) return 1; @@ -119,7 +121,7 @@ Curl_llist_remove(curl_llist *list, curl_llist_element *e, void *user) } void -Curl_llist_destroy(curl_llist *list, void *user) +Curl_llist_destroy(struct curl_llist *list, void *user) { if(list) { while (list->size > 0) |