From: Ralph Boehme Date: Fri, 2 Oct 2020 15:40:51 +0000 (+0200) Subject: smbd: remove redundant initialisation of the fsp fd X-Git-Tag: samba-4.14.0rc1~405 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dd8fe0cfc2627dcdcec140a85eb96b9da5a6dba4;p=thirdparty%2Fsamba.git smbd: remove redundant initialisation of the fsp fd This is already set to -1 by fd_handle_create(). Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index bf14f5dd454..43be98b4d8f 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -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;