From e9c14626acef7869b70d1dc05375ce77d464c3ac Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Nov 2024 16:23:19 +0100 Subject: [PATCH] smbd: Simplify smb_set_file_allocation_info() We've asserted fsp!=NULL in the caller Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- source3/smbd/smb2_trans2.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index ec20586f9fd..c7dcef16756 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4976,10 +4976,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn, "allocation size to %.0f\n", smb_fname_str_dbg(smb_fname), (double)allocation_size)); - if (fsp && - !fsp->fsp_flags.is_pathref && - fsp_get_io_fd(fsp) != -1) - { + if (!fsp->fsp_flags.is_pathref && (fsp_get_io_fd(fsp) != -1)) { /* Open file handle. */ status = check_any_access_fsp(fsp, FILE_WRITE_DATA); if (!NT_STATUS_IS_OK(status)) { -- 2.47.3