about summary refs log tree commit diff
path: root/iconvdata/8bit-generic.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-06 06:49:00 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-06 06:49:00 +0000
commit5ea1a82defd37feaa6be1faf44854364c901cdaf (patch)
tree9fad50dfb181485bb4ca62c9d96e0d31376dce07 /iconvdata/8bit-generic.c
parent365afefc6b7054d9ca7585f6f17bdd1fe03b8cfd (diff)
downloadglibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.tar.gz
glibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.tar.xz
glibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.zip
Update.
	* iconvdata/big5hkscs.c: Add __builtin_expect in many places.
	* iconvdata/big5.c: Likewise.
	* iconvdata/ansi_x3.110.c: Likewise.
	* iconvdata/8bit-generic.c: Likewise.
	* iconvdata/8bit-gap.c: Likewise.
	* iconv/loop.c: Likewise.
	* iconv/gconv_db.c: Likewise.
	* iconv/gconv_dl.c: Likewise.
	* iconv/gconv_simple.c: Likewise.
	* iconv/skeleton.c: Likewise.
Diffstat (limited to 'iconvdata/8bit-generic.c')
-rw-r--r--iconvdata/8bit-generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iconvdata/8bit-generic.c b/iconvdata/8bit-generic.c
index 3b6b47abb1..398bd67ba4 100644
--- a/iconvdata/8bit-generic.c
+++ b/iconvdata/8bit-generic.c
@@ -34,7 +34,7 @@
   {									      \
     uint32_t ch = to_ucs4[*inptr];					      \
 									      \
-    if (HAS_HOLES && ch == L'\0' && *inptr != '\0')			      \
+    if (HAS_HOLES && __builtin_expect (ch, L'\1') == L'\0' && *inptr != '\0') \
       {									      \
 	/* This is an illegal character.  */				      \
 	if (! ignore_errors_p ())					      \
@@ -61,8 +61,8 @@
   {									      \
     uint32_t ch = get32 (inptr);					      \
 									      \
-    if (ch >= sizeof (from_ucs4) / sizeof (from_ucs4[0])		      \
-	|| (ch != 0 && from_ucs4[ch] == '\0'))				      \
+    if (__builtin_expect (ch >= sizeof (from_ucs4) / sizeof (from_ucs4[0]), 0)\
+	|| (__builtin_expect (from_ucs4[ch], '\1') == '\0' && ch != 0))	      \
       {									      \
 	/* This is an illegal character.  */				      \
 	if (! ignore_errors_p ())					      \