X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fmemmove.c;h=c5ff8b520df9802d0ada61ee5a940a73e8d35d0c;hb=b156173b313f1903489b8c0c74292de350637f5f;hp=ea38e8df549e9e1210c0a38bbe8ed08e45a93603;hpb=0c4ac13f72de1689fcf6bc1847a4040c1f4ce6be;p=gnulib.git diff --git a/lib/memmove.c b/lib/memmove.c index ea38e8df5..c5ff8b520 100644 --- a/lib/memmove.c +++ b/lib/memmove.c @@ -3,17 +3,15 @@ In the public domain. By David MacKenzie . */ -#if HAVE_CONFIG_H -# include -#endif +#include + +#include void * -memmove (dest, source, length) - char *dest; - const char *source; - unsigned length; +memmove (void *dest0, void const *source0, size_t length) { - char *d0 = dest; + char *dest = dest0; + char const *source = source0; if (source < dest) /* Moving from low mem to hi mem; start at end. */ for (source += length, dest += length; length; --length) @@ -24,5 +22,5 @@ memmove (dest, source, length) for (; length; --length) *dest++ = *source++; } - return (void *) d0; + return dest0; }