From: Volker Lendecke Date: Sat, 23 Nov 2024 15:23:19 +0000 (+0100) Subject: smbd: Simplify smb_set_file_allocation_info() X-Git-Tag: tdb-1.4.13~434 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9c14626acef7869b70d1dc05375ce77d464c3ac;p=thirdparty%2Fsamba.git smbd: Simplify smb_set_file_allocation_info() We've asserted fsp!=NULL in the caller Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- 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)) {