diff options
author | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 14:45:42 +0100 |
---|---|---|
committer | Ondřej Bílka <neleai@seznam.cz> | 2014-02-10 15:07:12 +0100 |
commit | a1ffb40e32741f992c743e7b16c061fefa3747ac (patch) | |
tree | 246a29a87b26cfd5d07b17070f85eb3785018de9 /iconvdata/unicode.c | |
parent | 1448f3244714a9dabb5240ec18b094f100887d5c (diff) | |
download | glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.bz2 |
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'iconvdata/unicode.c')
-rw-r--r-- | iconvdata/unicode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/iconvdata/unicode.c b/iconvdata/unicode.c index 00d63ef..ed74582 100644 --- a/iconvdata/unicode.c +++ b/iconvdata/unicode.c @@ -64,7 +64,7 @@ else if (!data->__internal_use && data->__invocation_counter == 0) \ { \ /* 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); \ @@ -150,12 +150,12 @@ gconv_end (struct __gconv_step *data) { \ uint32_t c = get32 (inptr); \ \ - if (__builtin_expect (c >= 0x10000, 0)) \ + if (__glibc_unlikely (c >= 0x10000)) \ { \ UNICODE_TAG_HANDLER (c, 4); \ 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, because the UCS-2 output might be \ @@ -195,7 +195,7 @@ gconv_end (struct __gconv_step *data) if (swap) \ u1 = bswap_16 (u1); \ \ - if (__builtin_expect (u1 >= 0xd800 && u1 < 0xe000, 0)) \ + if (__glibc_unlikely (u1 >= 0xd800 && u1 < 0xe000)) \ { \ /* Surrogate characters in UCS-2 input are not valid. Reject \ them. (Catching this here is not security relevant.) */ \ |