From: Daniel Stenberg Date: Sat, 14 Dec 2024 09:34:45 +0000 (+0100) Subject: tool_getparam: fix "Ignored Return Value" X-Git-Tag: curl-8_12_0~356 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cffbbc693e7d831c8586a493e86570233c284bf8;p=thirdparty%2Fcurl.git tool_getparam: fix "Ignored Return Value" Follow-up from a300879b63b Pointed out by CodeSonar Closes #15740 --- diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 63b328c189..fc23263414 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -1051,8 +1051,8 @@ static ParameterError parse_url(struct GlobalConfig *global, /* fill in the URL */ err = getstr(&url->url, nextarg, DENY_BLANK); url->flags |= GETOUT_URL; - if((++config->num_urls > 1) && (config->etag_save_file || - config->etag_compare_file)) { + if(!err && (++config->num_urls > 1) && (config->etag_save_file || + config->etag_compare_file)) { errorf(global, "The etag options only work on a single URL"); return PARAM_BAD_USE; }