~ubuntu-branches/ubuntu/raring/curl/raring-updates

« back to all changes in this revision

Viewing changes to lib/llist.c

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Schuldei
  • Date: 2009-04-02 23:35:45 UTC
  • mto: (1.2.1 upstream) (3.2.3 sid)
  • mto: This revision was merged to the branch mainline in revision 38.
  • Revision ID: james.westby@ubuntu.com-20090402233545-geixkwhe3izccjt7
Tags: upstream-7.19.4
ImportĀ upstreamĀ versionĀ 7.19.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: llist.c,v 1.20 2008-01-16 12:24:00 bagder Exp $
 
21
 * $Id: llist.c,v 1.23 2008-10-20 23:24:37 yangtse Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
46
46
{
47
47
  struct curl_llist *list;
48
48
 
49
 
  list = (struct curl_llist *)malloc(sizeof(struct curl_llist));
 
49
  list = malloc(sizeof(struct curl_llist));
50
50
  if(NULL == list)
51
51
    return NULL;
52
52
 
62
62
Curl_llist_insert_next(struct curl_llist *list, struct curl_llist_element *e,
63
63
                       const void *p)
64
64
{
65
 
  struct curl_llist_element *ne =
66
 
    (struct curl_llist_element *) malloc(sizeof(struct curl_llist_element));
 
65
  struct curl_llist_element *ne = malloc(sizeof(struct curl_llist_element));
67
66
  if(!ne)
68
67
    return 0;
69
68
 
114
113
  }
115
114
 
116
115
  list->dtor(user, e->ptr);
 
116
 
117
117
  free(e);
118
118
  --list->size;
119
119