From dac8c83ab416a39b7d6b765334ccb9cd3be45b44 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 11 Jul 2025 09:23:50 +0200 Subject: [PATCH] tool_paramhelp: fix language in comments and tweak the logic a little bit Closes #17895 --- src/tool_paramhlp.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) 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"); -- 2.47.2