]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: remove superfluous check
authorDaniel Stenberg <daniel@haxx.se>
Sat, 16 May 2026 22:02:08 +0000 (00:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 16 May 2026 22:35:25 +0000 (00:35 +0200)
This pointer is already verified to be non-NULL some 15 lines above.

Pointed out by CodeSonar
Closes #21650

lib/url.c

index c63cf072e6628838bd0ecb94474c13252a07c990..ec4fb8b1b0f71d7690bdacd5877ce60a7e6bc085 100644 (file)
--- 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 */