From: Daniel Stenberg Date: Sun, 28 Dec 2025 21:40:47 +0000 (+0100) Subject: urlapi: set uncondtional return code X-Git-Tag: curl-8_18_0~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7fc78c2c1c0dc9913b78668b0942d7f8aba024ec;p=thirdparty%2Fcurl.git 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 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index c8a7a8c280..e974783d71 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -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; }