From: Volker Lendecke Date: Sat, 23 Nov 2024 15:32:18 +0000 (+0100) Subject: smbd: Simplify smb_set_file_allocation_info() X-Git-Tag: tdb-1.4.13~433 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef7ff7286fcc28d17220756db6d744b6dea0af7e;p=thirdparty%2Fsamba.git smbd: Simplify smb_set_file_allocation_info() Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index c7dcef16756..de1b5e21c1b 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -4962,8 +4962,7 @@ static NTSTATUS smb_set_file_allocation_info(connection_struct *conn, return NT_STATUS_INVALID_PARAMETER; } - allocation_size = (uint64_t)IVAL(pdata,0); - allocation_size |= (((uint64_t)IVAL(pdata,4)) << 32); + allocation_size = PULL_LE_U64(pdata, 0); DEBUG(10,("smb_set_file_allocation_info: Set file allocation info for " "file %s to %.0f\n", smb_fname_str_dbg(smb_fname), (double)allocation_size));