]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: remove redundant initialisation of the fsp fd
authorRalph Boehme <slow@samba.org>
Fri, 2 Oct 2020 15:40:51 +0000 (17:40 +0200)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:30 +0000 (09:08 +0000)
This is already set to -1 by fd_handle_create().

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index bf14f5dd4544f2ec4594b54a092d8fa7b71f1bad..43be98b4d8fff52f2300d6363f565913ba77d842 100644 (file)
@@ -1159,7 +1159,6 @@ static NTSTATUS open_file(files_struct *fsp,
        bool truncating = (flags & O_TRUNC);
        bool open_fd = false;
 
-       fsp->fh->fd = -1;
        errno = EPERM;
 
        /* Check permissions */
@@ -1392,7 +1391,6 @@ static NTSTATUS open_file(files_struct *fsp,
                                     smb_fname->base_name);
                }
        } else {
-               fsp->fh->fd = -1; /* What we used to call a stat open. */
                if (!file_existed) {
                        /* File must exist for a stat open. */
                        return NT_STATUS_OBJECT_NAME_NOT_FOUND;