]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib:util: Use PUSH_LE_(U16|U32) for S(S|I)VAL
authorAndreas Schneider <asn@samba.org>
Thu, 20 Dec 2018 10:23:46 +0000 (11:23 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 21 Feb 2020 02:09:33 +0000 (02:09 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/util/byteorder.h

index 053c4d22f5fe1beb2fee34ea6ed2bddb776c6743..16a46372ef68fc0ebec0025dabbdf2add414160c 100644 (file)
@@ -101,8 +101,8 @@ it also defines lots of intermediate macros, just ignore those :-)
 #define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
 #define SVALS(buf,pos) ((int16_t)SVAL(buf,pos))
 #define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
-#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16_t)(val)))
-#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
+#define SSVAL(buf,pos,val) PUSH_LE_U16(buf, pos, val)
+#define SIVAL(buf,pos,val) PUSH_LE_U32(buf, pos, val)
 #define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16_t)(val)))
 #define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))