aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_operate.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 689f769cb..1b7539459 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -205,8 +205,9 @@ static CURLcode operate_do(struct GlobalConfig *global,
int res = 0;
unsigned long li;
- bool orig_noprogress;
- bool orig_isatty;
+ /* Save the values of noprogress and isatty to restore them later on */
+ bool orig_noprogress = global->noprogress;
+ bool orig_isatty = global->isatty;
errorbuffer[0] = '\0';
@@ -336,10 +337,6 @@ static CURLcode operate_do(struct GlobalConfig *global,
}
}
- /* save the values of noprogress and isatty to restore them later on */
- orig_noprogress = global->noprogress;
- orig_isatty = global->isatty;
-
/*
** Nested loops start here.
*/