From 043d70fcdfa50c93dc826069aa5836206f8e3e2d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 25 Jan 2005 00:06:29 +0000 Subject: Use plain structs and not typedef'ed ones in the hash and linked-list code. --- lib/llist.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/llist.c') 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, , et al. + * Copyright (C) 1998 - 2005, Daniel Stenberg, , 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) -- cgit v1.2.3