From: Daniel Stenberg Date: Wed, 8 Oct 2014 10:21:39 +0000 (+0200) Subject: operate_do: skip superfluous check for NULL pointer X-Git-Tag: curl-7_39_0~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=987a4a73;p=thirdparty%2Fcurl.git operate_do: skip superfluous check for NULL pointer Coverity CID 1243583. get_url_file_name() cannot fail and return a NULL file name pointer so skip the check for that - it tricks coverity into believing it can happen and it then warns later on when we use 'outfile' without checking for NULL. --- diff --git a/src/tool_operate.c b/src/tool_operate.c index 488fb08c47..7448cad9cf 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -543,7 +543,7 @@ static CURLcode operate_do(struct GlobalConfig *global, res = get_url_file_name(&outfile, this_url); if(res) goto show_error; - if((!outfile || !*outfile) && !config->content_disposition) { + if(!*outfile && !config->content_disposition) { helpf(global->errors, "Remote file name has no length!\n"); res = CURLE_WRITE_ERROR; goto quit_urls;