about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-12-05 20:43:57 +0000
committerUlrich Drepper <drepper@redhat.com>1998-12-05 20:43:57 +0000
commit6685edd3c66d009b4172483051fe6f795cc5df49 (patch)
tree111dd8a2e2068b68062de863ec3256674165b249
parent9c8cfaf5434811ede5405711d3c0fd8eef5f65b3 (diff)
downloadglibc-6685edd3c66d009b4172483051fe6f795cc5df49.tar.gz
glibc-6685edd3c66d009b4172483051fe6f795cc5df49.tar.xz
glibc-6685edd3c66d009b4172483051fe6f795cc5df49.zip
Update.
	* ctype/ctype.h (_ISbit): Protect use of parameter with
	* wctype/wctype.h (_ISwbit): Likewise.
-rw-r--r--ChangeLog3
-rw-r--r--ctype/ctype.h6
2 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 66764fec2c..70039a8cf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,8 @@
 1998-12-05  Ulrich Drepper  <drepper@cygnus.com>
 
-	* wctype/wctype.h (_ISwbit): Protext use of parameter with
+	* ctype/ctype.h (_ISbit): Protect use of parameter with
 	parentheses.
+	* wctype/wctype.h (_ISwbit): Likewise.
 
 	* locale/Versions: Make experimental locale interface available in
 	GLIBC_2.1.
diff --git a/ctype/ctype.h b/ctype/ctype.h
index 37e2cbeb35..5f732d2340 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -39,9 +39,9 @@ __BEGIN_DECLS
 
 # include <endian.h>
 # if __BYTE_ORDER == __BIG_ENDIAN
-#  define _ISbit(bit)	(1 << bit)
+#  define _ISbit(bit)	(1 << (bit))
 # else /* __BYTE_ORDER == __LITTLE_ENDIAN */
-#  define _ISbit(bit)	(bit < 8 ? ((1 << bit) << 8) : ((1 << bit) >> 8))
+#  define _ISbit(bit)	((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
 # endif
 
 enum