From: Joseph Sutton Date: Thu, 30 Nov 2023 02:08:04 +0000 (+1300) Subject: lib:util: Cast macro parameter ‘val’ to expected type X-Git-Tag: talloc-2.4.2~229 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a62d38b6392508c19142c41a3f1bf7eddfc4824;p=thirdparty%2Fsamba.git lib:util: Cast macro parameter ‘val’ to expected type These macros are now consistent with PUSH_BE_U8() and with the PUSH_LE_*() macros. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/lib/util/bytearray.h b/lib/util/bytearray.h index ecab90b067d..f39340a5ee1 100644 --- a/lib/util/bytearray.h +++ b/lib/util/bytearray.h @@ -107,17 +107,17 @@ PUSH_BE_U8(data, pos, val) #define PUSH_BE_U16(data, pos, val) \ - (PUSH_BE_U8((data), (pos), (uint8_t)(((uint16_t)(val)) >> 8)), PUSH_BE_U8((data), (pos) + 1, (uint8_t)((val) & 0xff))) + (PUSH_BE_U8((data), (pos), (uint8_t)(((uint16_t)(val)) >> 8)), PUSH_BE_U8((data), (pos) + 1, (uint8_t)((uint16_t)(val) & 0xff))) #define PUSH_BE_I16(data, pos, val) \ PUSH_BE_U16(data, pos, val) #define PUSH_BE_U32(data, pos, val) \ - (PUSH_BE_U16((data), (pos), (uint16_t)(((uint32_t)(val)) >> 16)), PUSH_BE_U16((data), (pos) + 2, (uint16_t)((val) & 0xffff))) + (PUSH_BE_U16((data), (pos), (uint16_t)(((uint32_t)(val)) >> 16)), PUSH_BE_U16((data), (pos) + 2, (uint16_t)((uint32_t)(val) & 0xffff))) #define PUSH_BE_I32(data, pos, val) \ PUSH_BE_U32(data, pos, val) #define PUSH_BE_U64(data, pos, val) \ - (PUSH_BE_U32((data), (pos), (uint32_t)(((uint64_t)(val)) >> 32)), PUSH_BE_U32((data), (pos) + 4, (uint32_t)((val) & 0xffffffff))) + (PUSH_BE_U32((data), (pos), (uint32_t)(((uint64_t)(val)) >> 32)), PUSH_BE_U32((data), (pos) + 4, (uint32_t)((uint64_t)(val) & 0xffffffff))) #define PUSH_BE_I64(data, pos, val) \ PUSH_BE_U64(data, pos, val)