From 44ede0cc5a7b2165ac3c4704bd5763c9e242dff3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 17 May 2026 00:02:08 +0200 Subject: [PATCH] url: remove superfluous check This pointer is already verified to be non-NULL some 15 lines above. Pointed out by CodeSonar Closes #21650 --- lib/url.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/url.c b/lib/url.c index c63cf072e6..ec4fb8b1b0 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2200,10 +2200,9 @@ static CURLcode override_login(struct Curl_easy *data, if(result) goto out; } - else if(data->state.creds) { + else /* only search when something is still missing */ Curl_creds_link(&ncreds_in, data->state.creds); - } break; default: /* ignore credentials from other sources */