From b305bf616804db7176601bc2acd3495f0217e1c4 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 12 Oct 2023 03:54:29 +0000 Subject: Add UINT??_BSWAP as constexp macro; rip off typedef uint?? bandaid Signed-off-by: Laurent Bercot --- src/libstddjb/uint16_bswap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/libstddjb/uint16_bswap.c') diff --git a/src/libstddjb/uint16_bswap.c b/src/libstddjb/uint16_bswap.c index 6ab96ed..9cc0df0 100644 --- a/src/libstddjb/uint16_bswap.c +++ b/src/libstddjb/uint16_bswap.c @@ -1,9 +1,8 @@ /* ISC license. */ -#include #include uint16_t uint16_bswap (uint16_t a) { - return (a & 0x00ffu) << 8 | (a & 0xff00u) >> 8 ; + return UINT16_BSWAP(a) ; } -- cgit v1.2.3