aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/utf-32.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/utf-32.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'iconvdata/utf-32.c')
-rw-r--r--iconvdata/utf-32.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/iconvdata/utf-32.c b/iconvdata/utf-32.c
index f21f2be..7705d47 100644
--- a/iconvdata/utf-32.c
+++ b/iconvdata/utf-32.c
@@ -44,7 +44,7 @@
int swap; \
if (FROM_DIRECTION && var == UTF_32) \
{ \
- if (__builtin_expect (data->__invocation_counter == 0, 0)) \
+ if (__glibc_unlikely (data->__invocation_counter == 0)) \
{ \
/* We have to find out which byte order the file is encoded in. */ \
if (inptr + 4 > inend) \
@@ -65,7 +65,7 @@
&& data->__invocation_counter == 0) \
{ \
/* Emit the Byte Order Mark. */ \
- if (__builtin_expect (outbuf + 4 > outend, 0)) \
+ if (__glibc_unlikely (outbuf + 4 > outend)) \
return __GCONV_FULL_OUTPUT; \
\
put32u (outbuf, BOM); \
@@ -196,11 +196,11 @@ gconv_end (struct __gconv_step *data)
{ \
uint32_t c = get32 (inptr); \
\
- if (__builtin_expect (c >= 0x110000, 0)) \
+ if (__glibc_unlikely (c >= 0x110000)) \
{ \
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
- else if (__builtin_expect (c >= 0xd800 && c < 0xe000, 0)) \
+ else if (__glibc_unlikely (c >= 0xd800 && c < 0xe000)) \
{ \
/* Surrogate characters in UCS-4 input are not valid. \
We must catch this. If we let surrogates pass through, \
@@ -238,7 +238,7 @@ gconv_end (struct __gconv_step *data)
if (swap) \
u1 = bswap_32 (u1); \
\
- if (__builtin_expect (u1 >= 0x110000, 0)) \
+ if (__glibc_unlikely (u1 >= 0x110000)) \
{ \
/* This is illegal. */ \
STANDARD_FROM_LOOP_ERR_HANDLER (4); \