summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2010-09-28 13:20:45 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-28 13:20:45 -0700
commitabdb3695b21631ace52123fbe68f86fa4476a4b0 (patch)
tree0dbde1b5b77af3c4710d033b22d7628fa20f2782
parent319de1758cca4efcd18be773aba6c0b7e36dcbaf (diff)
parent0da2a8eb8728395867ec8a669e0aee2f243113db (diff)
downloadbionic-abdb3695b21631ace52123fbe68f86fa4476a4b0.zip
bionic-abdb3695b21631ace52123fbe68f86fa4476a4b0.tar.gz
bionic-abdb3695b21631ace52123fbe68f86fa4476a4b0.tar.bz2
am 0da2a8eb: am af00228b: Revert "libc: memmove(): non-overlapping block optim."
Merge commit '0da2a8eb8728395867ec8a669e0aee2f243113db' * commit '0da2a8eb8728395867ec8a669e0aee2f243113db': Revert "libc: memmove(): non-overlapping block optim."
-rw-r--r--libc/string/memmove.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libc/string/memmove.c b/libc/string/memmove.c
index 948a766..fcaf4ee 100644
--- a/libc/string/memmove.c
+++ b/libc/string/memmove.c
@@ -31,11 +31,7 @@ void *memmove(void *dst, const void *src, size_t n)
{
const char *p = src;
char *q = dst;
-
- /* we can use highgly-optimized memcpy() if the destination
- * is before the source, or if the two blocks are non-overlapping
- */
- if (__builtin_expect((q < p || (q-p) <= (ptrdiff_t)n), 1)) {
+ if (__builtin_expect(q < p, 1)) {
return memcpy(dst, src, n);
} else {
#define PRELOAD_DISTANCE 64