summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-03-29 09:32:14 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-03-29 09:45:53 +0200
commit6bb028dbda6cbfe83f66de773544f71e4813160f (patch)
tree32c0c0f2f472341a7d172222f34b324c2f7ee4fb /lib
parentd6fba0ca06d4fb7d09d083fbbd260e49c0860e7d (diff)
downloadcurl-6bb028dbda6cbfe83f66de773544f71e4813160f.tar.gz
transfer: clear 'referer' in declaration
To silence (false positive) compiler warnings about it. Follow-up to 7214288898f5625 Reviewed-by: Marcel Raad Closes #6810
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index a68c021c8..56ad5e612 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1582,7 +1582,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
if(data->set.http_auto_referer) {
CURLU *u;
- char *referer;
+ char *referer = NULL;
/* We are asked to automatically set the previous URL as the referer
when we get the next URL. We pick the ->url field, which may or may
@@ -1610,7 +1610,7 @@ CURLcode Curl_follow(struct Curl_easy *data,
curl_url_cleanup(u);
- if(uc || referer == NULL)
+ if(uc || !referer)
return CURLE_OUT_OF_MEMORY;
data->state.referer = referer;