From: Daniel Stenberg Date: Fri, 11 Jul 2025 07:23:50 +0000 (+0200) Subject: tool_paramhelp: fix language in comments X-Git-Tag: curl-8_15_0~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dac8c83ab416a39b7d6b765334ccb9cd3be45b44;p=thirdparty%2Fcurl.git tool_paramhelp: fix language in comments and tweak the logic a little bit Closes #17895 --- diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 74d338b779..97a6b6e2ee 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -710,22 +710,16 @@ CURLcode get_args(struct OperationConfig *config, const size_t i) return CURLE_OUT_OF_MEMORY; } - /* Check we have a password for the given host user */ - if(config->userpwd && !config->oauth_bearer) { + /* Check if we have a password for the given host user */ + if(config->userpwd && !config->oauth_bearer) result = checkpasswd("host", i, last, &config->userpwd); - if(result) - return result; - } - /* Check we have a password for the given proxy user */ - if(config->proxyuserpwd) { + /* Check if we have a password for the given proxy user */ + if(!result && config->proxyuserpwd) result = checkpasswd("proxy", i, last, &config->proxyuserpwd); - if(result) - return result; - } - /* Check we have a user agent */ - if(!config->useragent) { + /* Check if we have a user agent */ + if(!result && !config->useragent) { config->useragent = my_useragent(); if(!config->useragent) { errorf(config->global, "out of memory");