]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
import memmove fix from Andreas Schwab for powerpc memmove/bcopy.
authorWill Schmidt <will_schmidt@vnet.ibm.com>
Mon, 14 May 2012 17:15:55 +0000 (12:15 -0500)
committerWill Schmidt <will_schmidt@vnet.ibm.com>
Mon, 14 May 2012 17:15:55 +0000 (12:15 -0500)
ChangeLog
sysdeps/powerpc/memmove.c

index 43a0dab650aec657190ca170f28cc030aad78a3a..f198ac1e743214d1eeafd94cdfd96f41e940425f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-12  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * sysdeps/powerpc/memmove.c (MEMMOVE): Don't return a value if
+       used as bcopy.
+
 2012-04-18  Will Schmidt  <will_schmidt@vnet.ibm.com>
 
        * sysdeps/powerpc/memmove.c: New file based on string/memmove.c where
index 4887ae356fa8943769744521de68908eeda375c3..88e7e79c0b2a2b2a994e21749301a56ee85b2e70 100644 (file)
@@ -51,12 +51,12 @@ MEMMOVE (a1, a2, len)
   unsigned long int srcp = (long int) src;
 
   /* If there is no overlap between ranges, call the builtin memcpy.  */
-  if ( (dstp >= (srcp + len)) || (srcp > (dstp + len)) )
-    return __builtin_memcpy (dest, src, len);
+  if (dstp >= srcp + len || srcp > dstp + len)
+    __builtin_memcpy (dest, src, len);
 
   /* This test makes the forward copying code be used whenever possible.
      Reduces the working set.  */
-  if (dstp - srcp >= len)      /* *Unsigned* compare!  */
+  else if (dstp - srcp >= len)      /* *Unsigned* compare!  */
     {
       /* Copy from the beginning to the end.  */