]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - iconvdata/ibm932.c
Use glibc_likely instead __builtin_expect.
[thirdparty/glibc.git] / iconvdata / ibm932.c
index 4ceeaae5b96088c23bc849b56321864e5321703e..cd4361996326eefce2c5a1322135737c2bd6eb45 100644 (file)
@@ -64,7 +64,7 @@
     if (__builtin_expect (res == 0, 0) && ch != 0)                           \
       {                                                                              \
        /* Use the IBM932 table for double byte.  */                          \
-       if (__builtin_expect (inptr + 1 >= inend, 0))                         \
+       if (__glibc_unlikely (inptr + 1 >= inend))                            \
          {                                                                   \
            /* The second character is not available.                         \
               Store the intermediate result.  */                             \
     uint32_t high;                                                           \
     uint16_t pccode;                                                         \
                                                                              \
-    if (__builtin_expect (ch >= 0xffff, 0))                                  \
+    if (__glibc_unlikely (ch >= 0xffff))                                     \
       {                                                                              \
        UNICODE_TAG_HANDLER (ch, 4);                                          \
        rp = NULL;                                                            \
        high = (sizeof (__ucs4_to_ibm932db) >> 1)                             \
                / sizeof (__ucs4_to_ibm932db[0][FROM]);                       \
        pccode = ch;                                                          \
-       if (__builtin_expect (rp != NULL, 1))                                 \
+       if (__glibc_likely (rp != NULL))                                      \
          while (low < high)                                                  \
            {                                                                 \
              i = (low + high) >> 1;                                          \
            }                                                                 \
        if (found)                                                            \
          {                                                                   \
-           if (__builtin_expect (outptr + 2 > outend, 0))                    \
+           if (__glibc_unlikely (outptr + 2 > outend))                       \
              {                                                               \
                result = __GCONV_FULL_OUTPUT;                                 \
                break;                                                        \
       }                                                                              \
     else                                                                     \
       {                                                                              \
-       if (__builtin_expect (outptr + 1 > outend, 0))                        \
+       if (__glibc_unlikely (outptr + 1 > outend))                           \
          {                                                                   \
            result = __GCONV_FULL_OUTPUT;                                     \
            break;                                                            \