From a1ffb40e32741f992c743e7b16c061fefa3747ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20B=C3=ADlka?= Date: Mon, 10 Feb 2014 14:45:42 +0100 Subject: Use glibc_likely instead __builtin_expect. --- iconvdata/gbgbk.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'iconvdata/gbgbk.c') diff --git a/iconvdata/gbgbk.c b/iconvdata/gbgbk.c index b870d9d8fb..88f9cd994e 100644 --- a/iconvdata/gbgbk.c +++ b/iconvdata/gbgbk.c @@ -73,7 +73,7 @@ UCS4 -> GB2312 -> GBK -> UCS4 \ \ might not produce identical text. */ \ - if (__builtin_expect (inptr + 1 >= inend, 0)) \ + if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ /* The second character is not available. Store \ the intermediate result. */ \ @@ -81,7 +81,7 @@ break; \ } \ \ - if (__builtin_expect (outend - outptr < 2, 0)) \ + if (__glibc_unlikely (outend - outptr < 2)) \ { \ /* We ran out of space. */ \ result = __GCONV_FULL_OUTPUT; \ @@ -91,7 +91,7 @@ ch = (ch << 8) | inptr[1]; \ \ /* Map 0xA844 (U2015 in GBK) to 0xA1AA (U2015 in GB2312). */ \ - if (__builtin_expect (ch == 0xa844, 0)) \ + if (__glibc_unlikely (ch == 0xa844)) \ ch = 0xa1aa; \ \ /* Now determine whether the character is valid. */ \ @@ -134,7 +134,7 @@ \ if (ch > 0x7f) \ { \ - if (__builtin_expect (inptr + 1 >= inend, 0)) \ + if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ /* The second character is not available. Store \ the intermediate result. */ \ @@ -142,7 +142,7 @@ break; \ } \ \ - if (__builtin_expect (outend - outptr < 2, 0)) \ + if (__glibc_unlikely (outend - outptr < 2)) \ { \ /* We ran out of space. */ \ result = __GCONV_FULL_OUTPUT; \ -- cgit v1.2.1