aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-07-28 21:49:58 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-07-28 21:49:58 +0000
commit1c388a52a5bb87844700b9eaf3ddf0a1f2647afe (patch)
tree1abf0fdad80d164d65746912cc0d921c5d3a8a1e
parent34a827bbfe6f10588ead48f2bb9721c6c927ec89 (diff)
curl standard indent/format
-rw-r--r--lib/cookie.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 00ea0d635..0328f20d8 100644
--- a/lib/cookie.c
+++ b/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 */