diff options
author | Marco Nelissen <marcone@google.com> | 2010-09-28 10:24:20 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2010-09-28 10:24:20 -0700 |
commit | af00228b705b53165c132a22b30c2d6cbb9acd13 (patch) | |
tree | b66b8b3ce14c1731e6bebad7fcdc2bf019563d71 /libc | |
parent | defd162212de3789d2268a1f3339c2a6097fa825 (diff) | |
download | bionic-af00228b705b53165c132a22b30c2d6cbb9acd13.zip bionic-af00228b705b53165c132a22b30c2d6cbb9acd13.tar.gz bionic-af00228b705b53165c132a22b30c2d6cbb9acd13.tar.bz2 |
Revert "libc: memmove(): non-overlapping block optim."
This reverts commit 80fba9a2fe4eacaabee99cf0bbead872c2792231,
which caused the system to not boot anymore, aborting with:
"java.lang.RuntimeException: Missing static main on com.android.server.SystemServer".
Change-Id: I745e0a23c728cccf5f95a3c7642d544478a4e57e
Diffstat (limited to 'libc')
-rw-r--r-- | libc/string/memmove.c | 6 |
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 |