]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Eliminiate some dead code
authorVolker Lendecke <vl@samba.org>
Tue, 13 Jun 2023 13:33:03 +0000 (15:33 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 13 Jun 2023 23:33:39 +0000 (23:33 +0000)
If I'm not completely blind then there's no way how *pst can be a
valid stat. We did a SET_STAT_INVALID at the beginning of the
function, and there's no code path up to this if-statement that can
make *pst valid again.

Review with "git show -U40".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c

index 4c2ccb581590914ad9945a526f16159d67679397..9c74d6c0a309d8e14e949b365f22aa14f778bfbc 100644 (file)
@@ -446,11 +446,6 @@ static char *dptr_ReadDirName(TALLOC_CTX *ctx,
 
        dptr->did_stat = true;
 
-       if (VALID_STAT(*pst)) {
-               name = talloc_strdup(ctx, dptr->wcard);
-               goto ret;
-       }
-
        pathreal = talloc_asprintf(ctx,
                                "%s/%s",
                                dptr->dir_hnd->dir_smb_fname->base_name,