]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_operate: move the 'updated' variable
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Feb 2023 11:15:26 +0000 (12:15 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Feb 2023 11:16:13 +0000 (12:16 +0100)
This was already done by Dan Fandrich in the previous PR but somehow I
lost that fixup.

Follow-up to 349c5391f2121e

src/tool_operate.c

index ae17586d8c57d57d0ea149edeb1cf67302d64268..c9583b850fca11cad0b0877682acf092575fea65 100644 (file)
@@ -1208,7 +1208,6 @@ static CURLcode single_transfer(struct GlobalConfig *global,
           char *q = httpgetfields ? httpgetfields : config->query;
           CURLU *uh = curl_url();
           if(uh) {
-            char *updated;
             CURLUcode uerr;
             uerr = curl_url_set(uh, CURLUPART_URL, per->this_url,
                             CURLU_GUESS_SCHEME);
@@ -1219,6 +1218,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
               config->synthetic_error = TRUE;
             }
             else {
+              char *updated = NULL;
               uerr = curl_url_set(uh, CURLUPART_QUERY, q, CURLU_APPENDQUERY);
               if(!uerr)
                 uerr = curl_url_get(uh, CURLUPART_URL, &updated,