]> granicus.if.org Git - curl/commitdiff
cookies: change argument type for Curl_flush_cookies
authorDaniel Stenberg <daniel@haxx.se>
Thu, 3 Oct 2019 12:29:57 +0000 (14:29 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 3 Oct 2019 20:56:28 +0000 (22:56 +0200)
The second argument is really a 'bool' so use that and pass in TRUE/FALSE
to make it clear.

Closes #4455

lib/cookie.c
lib/cookie.h
lib/setopt.c
lib/url.c

index c6c4a7bdd9fad6fbbe0a00f6c0dc16ba2f927802..f56bd85a93cd9b1120e5d3c6cfb1b10568366901 100644 (file)
@@ -1617,7 +1617,7 @@ struct curl_slist *Curl_cookie_list(struct Curl_easy *data)
   return list;
 }
 
-void Curl_flush_cookies(struct Curl_easy *data, int cleanup)
+void Curl_flush_cookies(struct Curl_easy *data, bool cleanup)
 {
   if(data->set.str[STRING_COOKIEJAR]) {
     if(data->change.cookielist) {
index b2730cfb91d92bea4d281879a29bc84aa4634dd9..b3865e601a708909d4862a493a3b73d5c3664ec9 100644 (file)
@@ -109,7 +109,7 @@ void Curl_cookie_clearsess(struct CookieInfo *cookies);
 #define Curl_cookie_cleanup(x) Curl_nop_stmt
 #define Curl_flush_cookies(x,y) Curl_nop_stmt
 #else
-void Curl_flush_cookies(struct Curl_easy *data, int cleanup);
+void Curl_flush_cookies(struct Curl_easy *data, bool cleanup);
 void Curl_cookie_cleanup(struct CookieInfo *);
 struct CookieInfo *Curl_cookie_init(struct Curl_easy *data,
                                     const char *, struct CookieInfo *, bool);
index f2006cbf49e8d7efbeaefeb84aadf8ecf470bb56..64c29e3336f18f1d17b0f2fb041375eb6baf227f 100644 (file)
@@ -752,7 +752,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
     }
     else if(strcasecompare(argptr, "FLUSH")) {
       /* flush cookies to file, takes care of the locking */
-      Curl_flush_cookies(data, 0);
+      Curl_flush_cookies(data, FALSE);
     }
     else if(strcasecompare(argptr, "RELOAD")) {
       /* reload cookies from file */
index 8538d24dd7f0153b0c57d9d28075ccfd780209a0..fdbee90e6d319c2f477b63c40371bf76245509fe 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -374,7 +374,7 @@ CURLcode Curl_close(struct Curl_easy *data)
   Curl_safefree(data->state.buffer);
   Curl_safefree(data->state.headerbuff);
   Curl_safefree(data->state.ulbuf);
-  Curl_flush_cookies(data, 1);
+  Curl_flush_cookies(data, TRUE);
 #ifdef USE_ALTSVC
   Curl_altsvc_save(data->asi, data->set.str[STRING_ALTSVC]);
   Curl_altsvc_cleanup(data->asi);