commit 749fab2bf7b765dee5ed15a10530ebe115c77413 parent abecdd0f228230eb87fb26ff7c82616155932c55 Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev> Date: Fri, 25 Apr 2025 14:37:59 +0200 mhd_bithelpers: cosmetics Diffstat:
| M | src/mhd2/mhd_bithelpers.h | | | 17 | ++++++++--------- |
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/mhd2/mhd_bithelpers.h b/src/mhd2/mhd_bithelpers.h @@ -215,7 +215,6 @@ mhd_GET_32BIT_LE_UNALIGN (const void *addr) #ifndef mhd_GET_32BIT_LE_UNALIGNED if (0 != ((uintptr_t) addr) % (mhd_UINT32_ALIGN)) return mhd_GET_32BIT_LE_SLOW (addr); - else #endif /* ! mhd_PUT_64BIT_LE_UNALIGNED */ return mhd_GET_32BIT_LE (addr); } @@ -274,14 +273,14 @@ mhd_PUT_64BIT_BE_UNALIGN (void *dst, uint64_t value) #else /* mhd_BYTE_ORDER != mhd_LITTLE_ENDIAN */ /* Endianness was not detected or non-standard like PDP-endian */ # define mhd_GET_64BIT_BE(addr) \ - ( (((uint64_t) (((const uint8_t*) addr)[0])) << 56) \ - | (((uint64_t) (((const uint8_t*) addr)[1])) << 48) \ - | (((uint64_t) (((const uint8_t*) addr)[2])) << 40) \ - | (((uint64_t) (((const uint8_t*) addr)[3])) << 32) \ - | (((uint64_t) (((const uint8_t*) addr)[4])) << 24) \ - | (((uint64_t) (((const uint8_t*) addr)[5])) << 16) \ - | (((uint64_t) (((const uint8_t*) addr)[6])) << 8) \ - | ((uint64_t) (((const uint8_t*) addr)[7])) ) + ( (((uint64_t) (((const uint8_t*) addr)[0])) << 56) \ + | (((uint64_t) (((const uint8_t*) addr)[1])) << 48) \ + | (((uint64_t) (((const uint8_t*) addr)[2])) << 40) \ + | (((uint64_t) (((const uint8_t*) addr)[3])) << 32) \ + | (((uint64_t) (((const uint8_t*) addr)[4])) << 24) \ + | (((uint64_t) (((const uint8_t*) addr)[5])) << 16) \ + | (((uint64_t) (((const uint8_t*) addr)[6])) << 8) \ + | ((uint64_t) (((const uint8_t*) addr)[7])) ) /* Indicate that mhd_GET_64BIT_BE does not need aligned pointer */ # define mhd_GET_64BIT_BE_ALLOW_UNALIGNED 1 #endif /* mhd_BYTE_ORDER != mhd_LITTLE_ENDIAN */