summary refs log tree commit diff
path: root/iconvdata/utf-16.c
diff options
context:
space:
mode:
authorOndřej Bílka <neleai@seznam.cz>2014-02-10 14:45:42 +0100
committerOndřej Bílka <neleai@seznam.cz>2014-02-10 15:07:12 +0100
commita1ffb40e32741f992c743e7b16c061fefa3747ac (patch)
tree246a29a87b26cfd5d07b17070f85eb3785018de9 /iconvdata/utf-16.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
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 43be4be9c1..48edfa35f3 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.  */					      \