From 2af389de9abca5c701b20f157152bdea675a547b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 23 Nov 2024 16:38:53 +0100 Subject: [PATCH] smbd: Simplify smb_set_posix_lock() Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- source3/smbd/smb1_trans2.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source3/smbd/smb1_trans2.c b/source3/smbd/smb1_trans2.c index 3bb957348cc..c6186648a4c 100644 --- a/source3/smbd/smb1_trans2.c +++ b/source3/smbd/smb1_trans2.c @@ -347,10 +347,8 @@ static NTSTATUS smb_set_posix_lock(connection_struct *conn, } smblctx = (uint64_t)IVAL(pdata, POSIX_LOCK_PID_OFFSET); - offset = (((uint64_t) IVAL(pdata,(POSIX_LOCK_START_OFFSET+4))) << 32) | - ((uint64_t) IVAL(pdata,POSIX_LOCK_START_OFFSET)); - count = (((uint64_t) IVAL(pdata,(POSIX_LOCK_LEN_OFFSET+4))) << 32) | - ((uint64_t) IVAL(pdata,POSIX_LOCK_LEN_OFFSET)); + offset = PULL_LE_U64(pdata, POSIX_LOCK_START_OFFSET); + count = PULL_LE_U64(pdata, POSIX_LOCK_LEN_OFFSET); DBG_DEBUG("file %s, lock_type = %u, smblctx = %"PRIu64", " "count = %"PRIu64", offset = %"PRIu64"\n", -- 2.47.3