From: Daniel Stenberg Date: Sat, 31 Mar 2007 21:28:38 +0000 (+0000) Subject: check the correct variable to want about --stderr failures properly X-Git-Tag: curl-7_16_2~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d8b22d3de72d4e38d19e284d7656eea87c688b8;p=thirdparty%2Fcurl.git check the correct variable to want about --stderr failures properly CID 18 by the coverity.com scan --- diff --git a/src/main.c b/src/main.c index 5a953519d3..72f28e3c9e 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;