]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove unneeded NULL check inside msdfs_servicename_matches_connection().
authorJeremy Allison <jra@samba.org>
Thu, 11 Aug 2022 04:37:41 +0000 (21:37 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 28 Aug 2022 19:59:28 +0000 (19:59 +0000)
This is now only called from is from parse_dfs_path(),
and for that we know conn is non-NULL.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/msdfs.c

index f5de0541833a2b85d31f92817906d3ceb25259e9..34d22a5e1d25ae1644ceabf4d092332883da59e7 100644 (file)
@@ -50,11 +50,6 @@ static bool msdfs_servicename_matches_connection(struct connection_struct *conn,
        int snum;
        bool match = false;
 
-       if (conn == NULL) {
-               /* No connection always matches. */
-               return true;
-       }
-
        snum = SNUM(conn);
 
        conn_servicename = lp_servicename(talloc_tos(), lp_sub, snum);