struct curl_slist *last;
struct curl_slist *new_item;
- if(!data)
- return NULL;
+ DEBUGASSERT(data);
new_item = malloc(sizeof(struct curl_slist));
if(!new_item)
if(!list)
return new_item;
- last = slist_get_last(list);
- last->next = new_item;
- return list;
- }
+ last = slist_get_last(list);
+ last->next = new_item;
+ return list;
+}
/*
* curl_slist_append() appends a string to the linked list. It always returns
{
char *dupdata = strdup(data);
- if(!data)
+ if(!dupdata)
return NULL;
list = Curl_slist_append_nodup(list, dupdata);