about summary refs log tree commit diff
path: root/libio/wfileops.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 /libio/wfileops.c
parent1448f3244714a9dabb5240ec18b094f100887d5c (diff)
downloadglibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.gz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.tar.xz
glibc-a1ffb40e32741f992c743e7b16c061fefa3747ac.zip
Use glibc_likely instead __builtin_expect.
Diffstat (limited to 'libio/wfileops.c')
-rw-r--r--libio/wfileops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 877fc1f829..9cebe77126 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -123,7 +123,7 @@ _IO_wfile_underflow (fp)
   enum __codecvt_result status;
   _IO_ssize_t count;
 
-  if (__builtin_expect (fp->_flags & _IO_NO_READS, 0))
+  if (__glibc_unlikely (fp->_flags & _IO_NO_READS))
     {
       fp->_flags |= _IO_ERR_SEEN;
       __set_errno (EBADF);
@@ -264,7 +264,7 @@ _IO_wfile_underflow (fp)
   const char *from = fp->_IO_read_ptr;
   const char *to = fp->_IO_read_end;
   size_t to_copy = count;
-  if (__builtin_expect (naccbuf != 0, 0))
+  if (__glibc_unlikely (naccbuf != 0))
     {
       to_copy = MIN (sizeof (accbuf) - naccbuf, count);
       to = __mempcpy (&accbuf[naccbuf], from, to_copy);
@@ -277,7 +277,7 @@ _IO_wfile_underflow (fp)
 				   fp->_wide_data->_IO_buf_end,
 				   &fp->_wide_data->_IO_read_end);
 
-  if (__builtin_expect (naccbuf != 0, 0))
+  if (__glibc_unlikely (naccbuf != 0))
     fp->_IO_read_ptr += MAX (0, read_ptr_copy - &accbuf[naccbuf - to_copy]);
   else
     fp->_IO_read_ptr = (char *) read_ptr_copy;
@@ -341,7 +341,7 @@ _IO_wfile_underflow_mmap (_IO_FILE *fp)
   struct _IO_codecvt *cd;
   const char *read_stop;
 
-  if (__builtin_expect (fp->_flags & _IO_NO_READS, 0))
+  if (__glibc_unlikely (fp->_flags & _IO_NO_READS))
     {
       fp->_flags |= _IO_ERR_SEEN;
       __set_errno (EBADF);
@@ -581,7 +581,7 @@ adjust_wide_data (_IO_FILE *fp, bool do_convert)
 				       &fp->_wide_data->_IO_read_end);
 
       /* Should we return EILSEQ?  */
-      if (__builtin_expect (status == __codecvt_error, 0))
+      if (__glibc_unlikely (status == __codecvt_error))
 	{
 	  fp->_flags |= _IO_ERR_SEEN;
 	  return -1;
@@ -755,7 +755,7 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
 
 		  /* If there was an error, then return WEOF.
 		     TODO: set buffer state.  */
-		  if (__builtin_expect (status == __codecvt_error, 0))
+		  if (__glibc_unlikely (status == __codecvt_error))
 		      return WEOF;
 		}
 	      while (delta > 0);