aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-10-03 14:29:57 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-10-03 22:56:28 +0200
commit249541f12f1b03559faa4f96861fc4e6725e3f16 (patch)
tree5d991423a9150bbcecd12b473b36ea2bbcf319b5 /lib
parent8a00560de2804fa8ab639c6e895ed3a7f1e75efc (diff)
cookies: change argument type for Curl_flush_cookies
The second argument is really a 'bool' so use that and pass in TRUE/FALSE to make it clear. Closes #4455
Diffstat (limited to 'lib')
-rw-r--r--lib/cookie.c2
-rw-r--r--lib/cookie.h2
-rw-r--r--lib/setopt.c2
-rw-r--r--lib/url.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index c6c4a7bdd..f56bd85a9 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -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) {
diff --git a/lib/cookie.h b/lib/cookie.h
index b2730cfb9..b3865e601 100644
--- a/lib/cookie.h
+++ b/lib/cookie.h
@@ -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);
diff --git a/lib/setopt.c b/lib/setopt.c
index f2006cbf4..64c29e333 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -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 */
diff --git a/lib/url.c b/lib/url.c
index 8538d24dd..fdbee90e6 100644
--- 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);