diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-03-31 21:28:38 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-03-31 21:28:38 +0000 |
commit | 9d8b22d3de72d4e38d19e284d7656eea87c688b8 (patch) | |
tree | 62135167cf289ca1afce7565d4c87381894680ff | |
parent | 5796c7b1322375da0fa15620ca1a9c825df0ab01 (diff) |
check the correct variable to want about --stderr failures properly
CID 18 by the coverity.com scan
-rw-r--r-- | src/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 5a953519d..72f28e3c9 100644 --- a/src/main.c +++ b/src/main.c @@ -1769,7 +1769,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ case 'v': /* --stderr */ if(strcmp(nextarg, "-")) { FILE *newfile = fopen(nextarg, "wt"); - if(!config->errors) + if(!newfile) warnf(config, "Failed to open %s!\n", nextarg); else { config->errors = newfile; |