From 7fc78c2c1c0dc9913b78668b0942d7f8aba024ec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 28 Dec 2025 22:40:47 +0100 Subject: [PATCH] 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 --- lib/urlapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }