From: Jeremy Allison Date: Thu, 11 Aug 2022 04:37:41 +0000 (-0700) Subject: s3: smbd: Remove unneeded NULL check inside msdfs_servicename_matches_connection(). X-Git-Tag: talloc-2.4.0~1247 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d65f1c221fbc7122b48dd1065bb448c799dc670;p=thirdparty%2Fsamba.git s3: smbd: Remove unneeded NULL check inside msdfs_servicename_matches_connection(). 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index f5de0541833..34d22a5e1d2 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -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);