Remove K&R cruft.
[gnulib.git] / lib / memcpy.c
index 2ccd718..fdca8de 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 # include <config.h>
 #endif
 
+#include <stddef.h>
+
 /* Copy LEN bytes starting at SRCADDR to DESTADDR.  Result undefined
    if the source overlaps with the destination.
    Return DESTADDR. */
 
-char *
-memcpy (char *destaddr, const char *srcaddr, int len)
+void *
+memcpy (void *destaddr, void const *srcaddr, size_t len)
 {
   char *dest = destaddr;
+  char const *src = srcaddr;
 
   while (len-- > 0)
-    *destaddr++ = *srcaddr++;
-  return dest;
+    *dest++ = *src++;
+  return destaddr;
 }