From cffbbc693e7d831c8586a493e86570233c284bf8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 14 Dec 2024 10:34:45 +0100 Subject: [PATCH] tool_getparam: fix "Ignored Return Value" Follow-up from a300879b63b Pointed out by CodeSonar Closes #15740 --- src/tool_getparam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }