url: fix part of conditional expression is always true

Closes #10407
This commit is contained in:
Pronyushkin Petr 2023-02-03 11:26:30 +05:00 committed by Daniel Stenberg
parent 6740cf9ea0
commit 690c43b3ee
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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