aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/utf-16.c
diff options
context:
space:
mode:
Diffstat (limited to 'iconvdata/utf-16.c')
-rw-r--r--iconvdata/utf-16.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/iconvdata/utf-16.c b/iconvdata/utf-16.c
index 43be4be..48edfa3 100644
--- a/iconvdata/utf-16.c
+++ b/iconvdata/utf-16.c
@@ -43,7 +43,7 @@
#define PREPARE_LOOP \
enum direction dir = ((struct utf16_data *) step->__data)->dir; \
enum variant var = ((struct utf16_data *) step->__data)->var; \
- if (__builtin_expect (data->__invocation_counter == 0, 0)) \
+ if (__glibc_unlikely (data->__invocation_counter == 0)) \
{ \
if (var == UTF_16) \
{ \
@@ -67,7 +67,7 @@
else if (!FROM_DIRECTION && !data->__internal_use) \
{ \
/* Emit the Byte Order Mark. */ \
- if (__builtin_expect (outbuf + 2 > outend, 0)) \
+ if (__glibc_unlikely (outbuf + 2 > outend)) \
return __GCONV_FULL_OUTPUT; \
\
put16u (outbuf, BOM); \
@@ -200,7 +200,7 @@ gconv_end (struct __gconv_step *data)
{ \
uint32_t c = get32 (inptr); \
\
- if (__builtin_expect (c >= 0xd800 && c < 0xe000, 0)) \
+ 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, \
@@ -216,15 +216,15 @@ gconv_end (struct __gconv_step *data)
\
if (swap) \
{ \
- if (__builtin_expect (c >= 0x10000, 0)) \
+ if (__glibc_unlikely (c >= 0x10000)) \
{ \
- if (__builtin_expect (c >= 0x110000, 0)) \
+ if (__glibc_unlikely (c >= 0x110000)) \
{ \
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
\
/* Generate a surrogate character. */ \
- if (__builtin_expect (outptr + 4 > outend, 0)) \
+ if (__glibc_unlikely (outptr + 4 > outend)) \
{ \
/* Overflow in the output buffer. */ \
result = __GCONV_FULL_OUTPUT; \
@@ -240,15 +240,15 @@ gconv_end (struct __gconv_step *data)
} \
else \
{ \
- if (__builtin_expect (c >= 0x10000, 0)) \
+ if (__glibc_unlikely (c >= 0x10000)) \
{ \
- if (__builtin_expect (c >= 0x110000, 0)) \
+ if (__glibc_unlikely (c >= 0x110000)) \
{ \
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
\
/* Generate a surrogate character. */ \
- if (__builtin_expect (outptr + 4 > outend, 0)) \
+ if (__glibc_unlikely (outptr + 4 > outend)) \
{ \
/* Overflow in the output buffer. */ \
result = __GCONV_FULL_OUTPUT; \
@@ -296,7 +296,7 @@ gconv_end (struct __gconv_step *data)
\
/* It's a surrogate character. At least the first word says \
it is. */ \
- if (__builtin_expect (inptr + 4 > inend, 0)) \
+ if (__glibc_unlikely (inptr + 4 > inend)) \
{ \
/* We don't have enough input for another complete input \
character. */ \
@@ -330,7 +330,7 @@ gconv_end (struct __gconv_step *data)
{ \
/* It's a surrogate character. At least the first word says \
it is. */ \
- if (__builtin_expect (inptr + 4 > inend, 0)) \
+ if (__glibc_unlikely (inptr + 4 > inend)) \
{ \
/* We don't have enough input for another complete input \
character. */ \