summaryrefslogtreecommitdiff
path: root/lib/memmove.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-07-16 03:06:32 +0000
committerJim Meyering <jim@meyering.net>1996-07-16 03:06:32 +0000
commit2dad3861499c4748c85e216147faa9295814275f (patch)
tree8efb59c84b71288ee526bc760eb035275db8de11 /lib/memmove.c
parent783c1624bd8b027a65b3fba57d3213ccb1a6ddbd (diff)
downloadgnulib-2dad3861499c4748c85e216147faa9295814275f.tar.gz
Oops. Always return destination.TEXTUTILS-1_19d
Diffstat (limited to 'lib/memmove.c')
-rw-r--r--lib/memmove.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/memmove.c b/lib/memmove.c
index a5bf7660aa..d070796fdb 100644
--- a/lib/memmove.c
+++ b/lib/memmove.c
@@ -13,6 +13,7 @@ memmove (dest, source, length)
const char *source;
unsigned length;
{
+ char *d0 = dest;
if (source < dest)
/* Moving from low mem to hi mem; start at end. */
for (source += length, dest += length; length; --length)
@@ -22,7 +23,6 @@ memmove (dest, source, length)
/* Moving from hi mem to low mem; start at beginning. */
for (; length; --length)
*dest++ = *source++;
- --dest;
}
- return (void *) dest;
+ return (void *) d0;
}