commit fb10c20644bef6a46a7f1661aa25aa44943cf81f parent 3524e773d66df73d463a36e7c3bac6765b28d102 Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Date: Sat, 30 Aug 2025 18:25:46 +0200 mhd_bithelpers.h: reduced code duplication Diffstat:
| M | src/mhd2/mhd_bithelpers.h | | | 6 | +----- |
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/mhd2/mhd_bithelpers.h b/src/mhd2/mhd_bithelpers.h @@ -219,11 +219,7 @@ mhd_PUT_32BIT_LE_UNALIGN (void *dst, uint32_t value) mhd_BYTES_SWAP32 (*(const uint32_t*) (addr)) #else /* mhd_BYTE_ORDER != mhd_BIG_ENDIAN */ /* Endianness was not detected or non-standard like PDP-endian */ -# define mhd_GET_32BIT_LE(addr) \ - ( ( (uint32_t) (((const uint8_t*) addr)[0])) \ - | (((uint32_t) (((const uint8_t*) addr)[1])) << 8) \ - | (((uint32_t) (((const uint8_t*) addr)[2])) << 16) \ - | (((uint32_t) (((const uint8_t*) addr)[3])) << 24) ) +# define mhd_GET_32BIT_LE(addr) mhd_GET_32BIT_LE_SLOW ((addr)) /* Indicate that mhd_GET_32BIT_LE does not need aligned pointer */ # define mhd_GET_32BIT_LE_UNALIGNED 1 #endif /* mhd_BYTE_ORDER != mhd_BIG_ENDIAN */