diff options
author | Ian Moffett <ian@osmora.org> | 2024-04-01 19:43:45 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-04-01 19:47:07 -0400 |
commit | 9147e8ff6a175867ec7bf3b67ed481886f457c91 (patch) | |
tree | 8681b0bdee659fca43d65a3a54d6b0019ccc37f6 /sys | |
parent | 743dc962b0bb27bfc9fe4551b35f740d396a5bc1 (diff) |
kernel: cdefs: Fix __COMBINE macros
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/include/sys/cdefs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h index da78510..152765c 100644 --- a/sys/include/sys/cdefs.h +++ b/sys/include/sys/cdefs.h @@ -117,13 +117,13 @@ #define __POW2(x) (1ULL << x) /* Combine two 8-bit values into a 16-bit value */ -#define __COMBINE8(HI, LO) ((uint16_t)((uint8_t)HI << 8) | LO) +#define __COMBINE8(HI, LO) ((uint16_t)((uint16_t)HI << 8) | LO) /* Combine two 16-bit values into a 32-bit value */ -#define __COMBINE16(HI, LO) ((uint32_t)((uint16_t)HI << 16) | LO) +#define __COMBINE16(HI, LO) ((uint32_t)((uint32_t)HI << 16) | LO) /* Combine two 32-bit values into a 64-bit value */ -#define __COMBINE32(HI, LO) ((uint64_t)((uint16_t)HI << 32) | LO) +#define __COMBINE32(HI, LO) ((uint64_t)((uint64_t)HI << 32) | LO) /* * Used to give metadata to |