]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli/smb: convert smb2_lease_push() to PUSH_LE_U*
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Apr 2025 13:18:12 +0000 (15:18 +0200)
committerJule Anger <janger@samba.org>
Thu, 17 Apr 2025 15:59:12 +0000 (15:59 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15849

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit edf9cf4b29dab78f63eec8391cd1cd9eef861612)

libcli/smb/smb2_lease.c

index 4631b867949d2678f89c4d40591c60dcd6ce6ca2..3574fffba32a1af294b2e4921024a69b67f91713 100644 (file)
@@ -81,14 +81,14 @@ bool smb2_lease_push(const struct smb2_lease *lease, uint8_t *buf, size_t len)
        }
 
        memcpy(&buf[0], &lease->lease_key, 16);
-       SIVAL(buf, 16, lease->lease_state);
-       SIVAL(buf, 20, lease->lease_flags);
-       SBVAL(buf, 24, lease->lease_duration);
+       PUSH_LE_U32(buf, 16, lease->lease_state);
+       PUSH_LE_U32(buf, 20, lease->lease_flags);
+       PUSH_LE_U64(buf, 24, lease->lease_duration);
 
        if (version == 2) {
                memcpy(&buf[32], &lease->parent_lease_key, 16);
-               SSVAL(buf, 48, lease->lease_epoch);
-               SSVAL(buf, 50, 0); /* reserved */
+               PUSH_LE_U16(buf, 48, lease->lease_epoch);
+               PUSH_LE_U16(buf, 50, 0); /* reserved */
        }
 
        return true;