From 9d65f1c221fbc7122b48dd1065bb448c799dc670 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 10 Aug 2022 21:37:41 -0700 Subject: [PATCH] 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 --- source3/smbd/msdfs.c | 5 ----- 1 file changed, 5 deletions(-) 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); -- 2.47.3