summaryrefslogtreecommitdiff
path: root/libc/string/generic/memmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/generic/memmove.c')
-rw-r--r--libc/string/generic/memmove.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/string/generic/memmove.c b/libc/string/generic/memmove.c
index bf78c4778..1ac018013 100644
--- a/libc/string/generic/memmove.c
+++ b/libc/string/generic/memmove.c
@@ -23,7 +23,7 @@
#include "memcopy.h"
#include "pagecopy.h"
-#ifdef __ARCH_HAS_BWD_MEMCPY__
+#ifndef __ARCH_HAS_BWD_MEMCPY__
/* generic-opt memmove assumes memcpy does forward copying! */
#include "_memcpy_fwd.c"
#endif
@@ -224,8 +224,8 @@ void *memmove (void *dest, const void *src, size_t len)
Reduces the working set. */
if (dstp - srcp >= len) /* *Unsigned* compare! */
{
-#ifndef __ARCH_HAS_BWD_MEMCPY__
- /* Backward memcpy implementation cannot be used */
+#ifdef __ARCH_HAS_BWD_MEMCPY__
+ /* Backward memcpy implementation can be used */
memcpy(dest, src, len);
#else
/* Copy from the beginning to the end. */