From: Jim Meyering Date: Tue, 16 Jul 1996 03:06:32 +0000 (+0000) Subject: Oops. Always return destination. X-Git-Tag: TEXTUTILS-1_19b~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0239115553322d793fa24696658578c5d5e7b4a;p=thirdparty%2Fcoreutils.git Oops. Always return destination. --- 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; }