]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove an unused variable
authorVolker Lendecke <vl@samba.org>
Tue, 6 Sep 2022 07:29:18 +0000 (09:29 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 7 Sep 2022 18:40:28 +0000 (18:40 +0000)
ReadDirName happily takes NULL for "sbuf"

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

index 04dfef00d952a147f2fb4b9b7b48394e7921601b..64c7d5ca962eedd6602c69de1737250781596705 100644 (file)
@@ -1931,7 +1931,6 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp)
        long dirpos = 0;
        const char *dname = NULL;
        char *talloced = NULL;
-       SMB_STRUCT_STAT st;
        struct connection_struct *conn = fsp->conn;
        struct smb_Dir *dir_hnd = NULL;
 
@@ -1941,7 +1940,7 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp)
                return status;
        }
 
-       while ((dname = ReadDirName(dir_hnd, &dirpos, &st, &talloced))) {
+       while ((dname = ReadDirName(dir_hnd, &dirpos, NULL, &talloced))) {
                struct smb_filename *smb_dname_full = NULL;
                struct smb_filename *direntry_fname = NULL;
                char *fullname = NULL;