urlapi: set uncondtional return code

Curl_parse_login_details() can only return a single return code so
adjust accordingly.

Pointed out by CodeSonar

Closes #20107
This commit is contained in:
Daniel Stenberg 2025-12-28 22:40:47 +01:00
parent 2754e0f3d3
commit 7fc78c2c1c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -368,8 +368,9 @@ static CURLUcode parse_hostname_login(struct Curl_URL *u,
(h && (h->flags & PROTOPT_URLOPTIONS)) ?
&optionsp : NULL);
if(ccode) {
result = (ccode == CURLE_OUT_OF_MEMORY) ? CURLUE_OUT_OF_MEMORY :
CURLUE_BAD_LOGIN;
/* the only possible error from Curl_parse_login_details is out of
memory: */
result = CURLUE_OUT_OF_MEMORY;
goto out;
}