summaryrefslogtreecommitdiff
path: root/lib/memmove.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-09-10 09:03:31 +0000
committerJim Meyering <jim@meyering.net>2003-09-10 09:03:31 +0000
commitd10831f97b4ecadcdb415536259877c4c65e8325 (patch)
tree2b620fc71eb9dc0ae225a61951c1cd85e1da24cf /lib/memmove.c
parente0a2e262a57064c6f0d627aa4c5e1d1500d5f2e8 (diff)
downloadcoreutils-d10831f97b4ecadcdb415536259877c4c65e8325.tar.xz
Include <stddef.h>.
Use types required by C89 in prototype.
Diffstat (limited to 'lib/memmove.c')
-rw-r--r--lib/memmove.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/memmove.c b/lib/memmove.c
index ea38e8df5..79cc78273 100644
--- a/lib/memmove.c
+++ b/lib/memmove.c
@@ -7,13 +7,13 @@
# include <config.h>
#endif
+#include <stddef.h>
+
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 +24,5 @@ memmove (dest, source, length)
for (; length; --length)
*dest++ = *source++;
}
- return (void *) d0;
+ return dest0;
}