diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 20:50:16 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-01-07 20:50:16 +0200 |
| commit | acc26f85f32c68a51e5cc7b613cd0ea0b0630505 (patch) | |
| tree | 90d68a8292360f0796509f1febc7b66b0a53f4aa /common/bits.c | |
| parent | 8d90fb3e4a5d02df75584016563ef84901967b9f (diff) | |
| download | kmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.tar.gz kmi-acc26f85f32c68a51e5cc7b613cd0ea0b0630505.zip | |
Use #if defined(...) when not guard clause
Diffstat (limited to 'common/bits.c')
| -rw-r--r-- | common/bits.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/bits.c b/common/bits.c index ca99ed2..b9814f6 100644 --- a/common/bits.c +++ b/common/bits.c @@ -4,13 +4,13 @@ #include <apos/builtin.h> #undef __bswap16 -__weak uint16_t __bswap16(uint16_t u) +__weak uint16_t __bswap16(const uint16_t u) { return (u & 0xff00) >> 8 | (u & 0x00ff) << 8; } #undef __bswap32 -__weak uint32_t __bswap32(uint32_t u) +__weak uint32_t __bswap32(const uint32_t u) { return (u & 0xff000000) >> 24 | (u & 0x00ff0000) >> 8 | @@ -19,7 +19,7 @@ __weak uint32_t __bswap32(uint32_t u) } #undef __bswap64 -__weak uint64_t __bswap64(uint64_t u) +__weak uint64_t __bswap64(const uint64_t u) { return (u & 0xff00000000000000ULL) >> 56 | (u & 0x00ff000000000000ULL) >> 40 | |
