summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2021-02-06 11:40:18 +0100
committerMarcel Raad <Marcel.Raad@teamviewer.com>2021-02-10 16:47:15 +0100
commitfa624f0baa4e1350546c31b54a5942f493de7dd3 (patch)
treec40a6f471a881be3634adb34b4ceaef3c0ac0bf6 /src
parent4c02d003ff581166d8adf43cd1606eaa4ace945d (diff)
downloadcurl-fa624f0baa4e1350546c31b54a5942f493de7dd3.tar.gz
tool_paramhlp: reduce variable scope
Closes https://github.com/curl/curl/pull/6576
Diffstat (limited to 'src')
-rw-r--r--src/tool_paramhlp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 461474644..49deb0929 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -40,10 +40,11 @@
struct getout *new_getout(struct OperationConfig *config)
{
- static int outnum = 0;
struct getout *node = calloc(1, sizeof(struct getout));
struct getout *last = config->url_last;
if(node) {
+ static int outnum = 0;
+
/* append this new node last in the list */
if(last)
last->next = node;