aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/8bit-gap.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-gap.c
parent365afefc6b7054d9ca7585f6f17bdd1fe03b8cfd (diff)
downloadglibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.zip
glibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.tar.gz
glibc-5ea1a82defd37feaa6be1faf44854364c901cdaf.tar.bz2
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-gap.c')
-rw-r--r--iconvdata/8bit-gap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/iconvdata/8bit-gap.c b/iconvdata/8bit-gap.c
index c805d5e..75493f7 100644
--- a/iconvdata/8bit-gap.c
+++ b/iconvdata/8bit-gap.c
@@ -48,7 +48,7 @@ struct gap
{ \
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 ()) \
@@ -80,7 +80,7 @@ struct gap
uint32_t ch = get32 (inptr); \
unsigned char res; \
\
- if (ch >= 0xffff) \
+ if (__builtin_expect (ch, 0) >= 0xffff) \
{ \
/* This is an illegal character. */ \
if (! ignore_errors_p ()) \
@@ -95,7 +95,7 @@ struct gap
} \
while (ch > rp->end) \
++rp; \
- if (ch < rp->start) \
+ if (__builtin_expect (ch < rp->start, 0)) \
{ \
/* This is an illegal character. */ \
if (! ignore_errors_p ()) \
@@ -110,7 +110,7 @@ struct gap
} \
\
res = from_ucs4[ch + rp->idx]; \
- if (ch != 0 && res == '\0') \
+ if (__builtin_expect (res, '\1') == '\0' && ch != 0) \
{ \
/* This is an illegal character. */ \
if (! ignore_errors_p ()) \