diff options
author | Jim Meyering <jim@meyering.net> | 1996-07-16 03:06:32 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-07-16 03:06:32 +0000 |
commit | e0239115553322d793fa24696658578c5d5e7b4a (patch) | |
tree | b3c6f732082fcda6f6805cb81384b6a2af4af4cf /lib | |
parent | b19da298acc006b7f3e684b4cebd99c431916aa2 (diff) | |
download | coreutils-e0239115553322d793fa24696658578c5d5e7b4a.tar.xz |
Oops. Always return destination.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/memmove.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/memmove.c b/lib/memmove.c index a5bf7660a..d070796fd 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; } |