tool_getparam: fix "Ignored Return Value"

Follow-up from a300879b63

Pointed out by CodeSonar

Closes #15740
This commit is contained in:
Daniel Stenberg 2024-12-14 10:34:45 +01:00
parent 7347ddc9e2
commit cffbbc693e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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;
}