about summary refs log tree commit diff
path: root/wctype
diff options
context:
space:
mode:
Diffstat (limited to 'wctype')
-rw-r--r--wctype/wctype.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/wctype/wctype.h b/wctype/wctype.h
index 8bcbaf987b..2812bd8286 100644
--- a/wctype/wctype.h
+++ b/wctype/wctype.h
@@ -70,10 +70,10 @@ typedef unsigned long int wctype_t;
 #   define _ISwbit(bit)	(1 << (bit))
 #  else /* __BYTE_ORDER == __LITTLE_ENDIAN */
 #   define _ISwbit(bit)	\
-	((bit) < 8 ? (int) (1UL << ((bit) + 24))			      \
-	 : ((bit) < 16 ? (int) (1UL << ((bit) + 8))			      \
-	    : ((bit) < 24 ? (int) (1UL << ((bit) - 8 ))			      \
-	       : (int) (1UL << ((bit) - 24 )))))
+	((bit) < 8 ? (int) ((1UL << (bit)) << 24)			      \
+	 : ((bit) < 16 ? (int) ((1UL << (bit)) << 8)			      \
+	    : ((bit) < 24 ? (int) ((1UL << (bit)) >> 8)			      \
+	       : (int) ((1UL << (bit)) >> 24))))
 #  endif
 
 enum