From: Volker Lendecke Date: Tue, 13 Jun 2023 13:33:03 +0000 (+0200) Subject: smbd: Eliminiate some dead code X-Git-Tag: talloc-2.4.1~429 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae4d8ddbeefeedd6ac436a0ab17571fb512e1efd;p=thirdparty%2Fsamba.git smbd: Eliminiate some dead code 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 4c2ccb58159..9c74d6c0a30 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -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,