]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify smb_set_file_end_of_file_info()
authorVolker Lendecke <vl@samba.org>
Wed, 4 Dec 2024 15:06:10 +0000 (16:06 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Dec 2024 12:30:31 +0000 (12:30 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
source3/smbd/smb2_trans2.c

index 2c2bc7e79703167f4c88ed14d520ed6f57515f1f..4df3cc0eab11a4161ec856174c9435c3fbec0d8b 100644 (file)
@@ -5052,8 +5052,7 @@ static NTSTATUS smb_set_file_end_of_file_info(connection_struct *conn,
                return NT_STATUS_INVALID_PARAMETER;
        }
 
-       size = IVAL(pdata,0);
-       size |= (((off_t)IVAL(pdata,4)) << 32);
+       size = (off_t)PULL_LE_U64(pdata, 0);
        DBG_DEBUG("Set end of file info for file %s to %ju\n",
                  smb_fname_str_dbg(smb_fname),
                  (uintmax_t)size);