]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_paramhlp: reduce variable scope
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sat, 6 Feb 2021 10:40:18 +0000 (11:40 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Wed, 10 Feb 2021 15:47:15 +0000 (16:47 +0100)
Closes https://github.com/curl/curl/pull/6576

src/tool_paramhlp.c

index 46147464416e4b7e7860e90313206e6f8c9c72d9..49deb0929f09bf5a9576784f796eb6f29f513846 100644 (file)
 
 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;