Skip to content

Commit

Permalink
operate_do: skip superfluous check for NULL pointer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bagder committed Oct 8, 2014
1 parent e0d269c commit 987a4a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tool_operate.c
Expand Up @@ -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;
Expand Down

0 comments on commit 987a4a7

Please sign in to comment.