summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/include
diff options
context:
space:
mode:
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r--sys/powerpc/include/endian.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/include/endian.h b/sys/powerpc/include/endian.h
index 15dd7db..bfca169 100644
--- a/sys/powerpc/include/endian.h
+++ b/sys/powerpc/include/endian.h
@@ -124,8 +124,8 @@ __bswap64_var(__uint64_t _x)
((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
}
-#define __bswap16(x) (__is_constant(x) ? __bswap16_const(x) : \
- __bswap16_var(x))
+#define __bswap16(x) ((__uint16_t)(__is_constant(x) ? __bswap16_const(x) : \
+ __bswap16_var(x)))
#define __bswap32(x) (__is_constant(x) ? __bswap32_const(x) : \
__bswap32_var(x))
#define __bswap64(x) (__is_constant(x) ? __bswap64_const(x) : \
OpenPOWER on IntegriCloud