]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: fix part of conditional expression is always true
authorPronyushkin Petr <pyetr.pronyushkin@fsight.ru>
Fri, 3 Feb 2023 06:26:30 +0000 (11:26 +0500)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Feb 2023 07:51:31 +0000 (08:51 +0100)
Closes #10407

lib/url.c

index 3f9142e8122010d243245917f55561de6f47e702..e8f2d12b895676e8d86e1484b4339c7ebecafe44 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2744,7 +2744,7 @@ static CURLcode override_login(struct Curl_easy *data,
         return CURLE_OUT_OF_MEMORY;
     }
     /* no user was set but a password, set a blank user */
-    if(userp && !*userp && *passwdp) {
+    if(!*userp && *passwdp) {
       *userp = strdup("");
       if(!*userp)
         return CURLE_OUT_OF_MEMORY;