curl standard indent/format
authorDaniel Stenberg <daniel@haxx.se>
Thu, 28 Jul 2005 21:49:58 +0000 (21:49 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 28 Jul 2005 21:49:58 +0000 (21:49 +0000)
lib/cookie.c

index 00ea0d6..0328f20 100644 (file)
@@ -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 */