smbd: Simplify smbd_dirptr_lanman2_mode_fn()
authorVolker Lendecke <vl@samba.org>
Sun, 2 Jan 2022 18:26:06 +0000 (19:26 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 11 Feb 2022 21:53:22 +0000 (21:53 +0000)
Avoid an else, we return in the "true" branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 11 21:53:22 UTC 2022 on sn-devel-184

source3/smbd/trans2.c

index 9dc0d648cd8220c23cbca06d66d07577afe7fd8b..cf5f6fedfdcf66e3002fee42a0228f1e80e0a91c 100644 (file)
@@ -1709,8 +1709,10 @@ static bool smbd_dirptr_lanman2_mode_fn(TALLOC_CTX *ctx,
                        return false;
                }
                return true;
-       } else if (!VALID_STAT(smb_fname->st) &&
-                  SMB_VFS_STAT(state->conn, smb_fname) != 0) {
+       }
+
+       if (!VALID_STAT(smb_fname->st) &&
+           SMB_VFS_STAT(state->conn, smb_fname) != 0) {
                /* Needed to show the msdfs symlinks as
                 * directories */