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/gbbig5.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'iconvdata/gbbig5.c') diff --git a/iconvdata/gbbig5.c b/iconvdata/gbbig5.c index 9a68c5cc7d..1eb1067bb1 100644 --- a/iconvdata/gbbig5.c +++ b/iconvdata/gbbig5.c @@ -4805,7 +4805,7 @@ const char __from_big5_to_gb2312 [13973][2] = const char *cp; \ int idx; \ \ - if (__builtin_expect (inptr + 1 >= inend, 0)) \ + if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ /* The second character is not available. Store \ the intermediate result. */ \ @@ -4817,7 +4817,7 @@ const char __from_big5_to_gb2312 [13973][2] = ch = inptr[1]; \ \ /* All second bytes of a multibyte character must be >= 0xa1. */ \ - if (__builtin_expect (ch < 0xa1, 0)) \ + if (__glibc_unlikely (ch < 0xa1)) \ { \ /* This is an illegal character. */ \ STANDARD_FROM_LOOP_ERR_HANDLER (1); \ @@ -4827,7 +4827,7 @@ const char __from_big5_to_gb2312 [13973][2] = \ /* Get the value from the table. */ \ cp = __from_gb2312_to_big5[idx]; \ - if (__builtin_expect (cp[0] == '\0', 0)) \ + if (__glibc_unlikely (cp[0] == '\0')) \ { \ /* We do not have a mapping for this character. \ If ignore errors, map it to 0xa1bc - big5 box character */ \ @@ -4836,7 +4836,7 @@ const char __from_big5_to_gb2312 [13973][2] = break; \ \ /* See if there is enough room to write the second byte. */ \ - if (__builtin_expect (outptr + 1 >= outend, 0)) \ + if (__glibc_unlikely (outptr + 1 >= outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ @@ -4894,7 +4894,7 @@ const char __from_big5_to_gb2312 [13973][2] = const char *cp; \ int idx; \ \ - if (__builtin_expect (inptr + 1 >= inend, 0)) \ + if (__glibc_unlikely (inptr + 1 >= inend)) \ { \ /* The second character is not available. Store \ the intermediate result. */ \ @@ -4918,7 +4918,7 @@ const char __from_big5_to_gb2312 [13973][2] = \ /* Get the value from the table. */ \ cp = __from_big5_to_gb2312 [idx]; \ - if (__builtin_expect (cp[0] == '\0', 0)) \ + if (__glibc_unlikely (cp[0] == '\0')) \ { \ /* We do not have a mapping for this character. \ If ignore errors, map it to 0xa1f5 - gb box character */ \ @@ -4927,7 +4927,7 @@ const char __from_big5_to_gb2312 [13973][2] = break; \ \ /* See if there is enough room to write the second byte. */ \ - if (__builtin_expect (outptr + 1 >= outend, 0)) \ + if (__glibc_unlikely (outptr + 1 >= outend)) \ { \ result = __GCONV_FULL_OUTPUT; \ break; \ -- cgit v1.2.3