summaryrefslogtreecommitdiff
path: root/iconvdata/shift_jisx0213.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /iconvdata/shift_jisx0213.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'iconvdata/shift_jisx0213.c')
-rw-r--r--iconvdata/shift_jisx0213.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/iconvdata/shift_jisx0213.c b/iconvdata/shift_jisx0213.c
index 94a2d155d6..a6c19acf3c 100644
--- a/iconvdata/shift_jisx0213.c
+++ b/iconvdata/shift_jisx0213.c
@@ -79,7 +79,7 @@
{ \
if (FROM_DIRECTION) \
{ \
- if (__builtin_expect (outbuf + 4 <= outend, 1)) \
+ if (__glibc_likely (outbuf + 4 <= outend)) \
{ \
/* Write out the last character. */ \
*((uint32_t *) outbuf) = data->__statep->__count >> 3; \
@@ -92,7 +92,7 @@
} \
else \
{ \
- if (__builtin_expect (outbuf + 2 <= outend, 1)) \
+ if (__glibc_likely (outbuf + 2 <= outend)) \
{ \
/* Write out the last character. */ \
uint32_t lasttwo = data->__statep->__count >> 3; \
@@ -119,7 +119,7 @@
\
/* Determine whether there is a buffered character pending. */ \
ch = *statep >> 3; \
- if (__builtin_expect (ch == 0, 1)) \
+ if (__glibc_likely (ch == 0)) \
{ \
/* No - so look at the next input byte. */ \
ch = *inptr; \
@@ -127,9 +127,9 @@
if (ch < 0x80) \
{ \
/* Plain ISO646-JP character. */ \
- if (__builtin_expect (ch == 0x5c, 0)) \
+ if (__glibc_unlikely (ch == 0x5c)) \
ch = 0xa5; \
- else if (__builtin_expect (ch == 0x7e, 0)) \
+ else if (__glibc_unlikely (ch == 0x7e)) \
ch = 0x203e; \
++inptr; \
} \
@@ -144,7 +144,7 @@
/* Two byte character. */ \
uint32_t ch2; \
\
- if (__builtin_expect (inptr + 1 >= inend, 0)) \
+ if (__glibc_unlikely (inptr + 1 >= inend)) \
{ \
/* The second byte is not available. */ \
result = __GCONV_INCOMPLETE_INPUT; \
@@ -154,7 +154,7 @@
ch2 = inptr[1]; \
\
/* The second byte must be in the range 0x{40..7E,80..FC}. */ \
- if (__builtin_expect (ch2 < 0x40 || ch2 == 0x7f || ch2 > 0xfc, 0))\
+ if (__glibc_unlikely (ch2 < 0x40 || ch2 == 0x7f || ch2 > 0xfc)) \
{ \
/* This is an illegal character. */ \
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
@@ -332,7 +332,7 @@ static const struct
if (len > 0) \
{ \
/* Output the combined character. */ \
- if (__builtin_expect (outptr + 1 >= outend, 0)) \
+ if (__glibc_unlikely (outptr + 1 >= outend)) \
{ \
result = __GCONV_FULL_OUTPUT; \
break; \
@@ -347,7 +347,7 @@ static const struct
\
not_combining: \
/* Output the buffered character. */ \
- if (__builtin_expect (outptr + 1 >= outend, 0)) \
+ if (__glibc_unlikely (outptr + 1 >= outend)) \
{ \
result = __GCONV_FULL_OUTPUT; \
break; \
@@ -421,7 +421,7 @@ static const struct
} \
\
/* Output the shifted representation. */ \
- if (__builtin_expect (outptr + 1 >= outend, 0)) \
+ if (__glibc_unlikely (outptr + 1 >= outend)) \
{ \
result = __GCONV_FULL_OUTPUT; \
break; \