]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_paramhelp: fix language in comments
authorDaniel Stenberg <daniel@haxx.se>
Fri, 11 Jul 2025 07:23:50 +0000 (09:23 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 12 Jul 2025 19:54:32 +0000 (21:54 +0200)
and tweak the logic a little bit

Closes #17895

src/tool_paramhlp.c

index 74d338b779bcd9918410689591391dd73509e354..97a6b6e2eef1cc8b71c17e032a076671e494be07 100644 (file)
@@ -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");