diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-08-04 11:49:27 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-08-05 11:52:27 +0200 |
commit | d6c8def82a2cfc0d177acc81e4244221d4e98f2f (patch) | |
tree | ee4336ba58f1e3b242fa1177ffaeef763190c8d0 /src/tool_parsecfg.c | |
parent | 0b11660234c4f9bbea7308402ad739dc3f153b08 (diff) | |
download | curl-d6c8def82a2cfc0d177acc81e4244221d4e98f2f.tar.gz |
getparameter: avoid returning uninitialized 'usedarg'
Fixes #1728
Diffstat (limited to 'src/tool_parsecfg.c')
-rw-r--r-- | src/tool_parsecfg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index 8432e5794..93814f454 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -49,7 +49,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) int res; FILE *file; char filebuffer[512]; - bool usedarg; + bool usedarg = FALSE; char *home; int rc = 0; struct OperationConfig *operation = global->first; @@ -220,7 +220,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global) #endif res = getparameter(option, param, &usedarg, global, operation); - if(param && *param && !usedarg) + if(!res && param && *param && !usedarg) /* we passed in a parameter that wasn't used! */ res = PARAM_GOT_EXTRA_PARAMETER; |