mirror of
https://github.com/curl/curl.git
synced 2026-07-23 16:37:18 +03:00
curl standard indent/format
This commit is contained in:
parent
34a827bbfe
commit
1c388a52a5
1 changed files with 22 additions and 21 deletions
43
lib/cookie.c
43
lib/cookie.c
|
|
@ -906,32 +906,33 @@ int Curl_cookie_output(struct CookieInfo *c, char *dumphere)
|
|||
|
||||
struct curl_slist *Curl_cookie_list(struct SessionHandle *data)
|
||||
{
|
||||
struct curl_slist *list = NULL;
|
||||
struct curl_slist *beg;
|
||||
struct Cookie *c;
|
||||
char *line;
|
||||
struct curl_slist *list = NULL;
|
||||
struct curl_slist *beg;
|
||||
struct Cookie *c;
|
||||
char *line;
|
||||
|
||||
if (data->cookies == NULL) return NULL;
|
||||
if (data->cookies->numcookies == 0) return NULL;
|
||||
if ((data->cookies == NULL) ||
|
||||
(data->cookies->numcookies == 0))
|
||||
return NULL;
|
||||
|
||||
c = data->cookies->cookies;
|
||||
c = data->cookies->cookies;
|
||||
|
||||
beg = list;
|
||||
while (c) {
|
||||
/* fill the list with _all_ the cookies we know */
|
||||
line = get_netscape_format(c);
|
||||
if (line == NULL) {
|
||||
/* get_netscape_format returns null only if we run out of memory */
|
||||
beg = list;
|
||||
while (c) {
|
||||
/* fill the list with _all_ the cookies we know */
|
||||
line = get_netscape_format(c);
|
||||
if (line == NULL) {
|
||||
/* get_netscape_format returns null only if we run out of memory */
|
||||
|
||||
curl_slist_free_all(beg); /* free some memory */
|
||||
return NULL;
|
||||
}
|
||||
list = curl_slist_append(list, line);
|
||||
free(line);
|
||||
c = c->next;
|
||||
}
|
||||
curl_slist_free_all(beg); /* free some memory */
|
||||
return NULL;
|
||||
}
|
||||
list = curl_slist_append(list, line);
|
||||
free(line);
|
||||
c = c->next;
|
||||
}
|
||||
|
||||
return list;
|
||||
return list;
|
||||
}
|
||||
|
||||
#endif /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue