From 9d8b22d3de72d4e38d19e284d7656eea87c688b8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 31 Mar 2007 21:28:38 +0000 Subject: check the correct variable to want about --stderr failures properly CID 18 by the coverity.com scan --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3