summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-08-04 11:49:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-04 11:49:57 +0200
commit3816791f4a3ed2f7336e83e9ecf4fe26d4d4171e (patch)
tree78f242b44506ca357506057d39662df039595eba /src/tool_getparam.c
parent26e02eae4ba359938230bc449feba1d22a4733bd (diff)
downloadcurl-bagder/getparam-fix-1728.tar.gz
getparameter: avoid returning uninitialized 'usedarg'bagder/getparam-fix-1728
Fixes #1728
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index cc2d816f1..089d28574 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -443,6 +443,7 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
bool toggle = TRUE; /* how to switch boolean options, on or off. Controlled
by using --OPTION or --no-OPTION */
+ *usedarg = FALSE; /* default is that we don't use the arg */
if(('-' != flag[0]) ||
(('-' == flag[0]) && ('-' == flag[1]))) {
@@ -496,7 +497,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
letter = parse[0];
subletter = parse[1];
}
- *usedarg = FALSE; /* default is that we don't use the arg */
if(hit < 0) {
for(j = 0; j < sizeof(aliases)/sizeof(aliases[0]); j++) {