1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-31 09:15:19 +02:00
Files
coreutils/lib/memcpy.c
Jim Meyering 4abe75d3b1 .
1996-10-29 13:50:37 +00:00

21 lines
383 B
C

/* Copy LEN bytes starting at SRCADDR to DESTADDR. Result undefined
if the source overlaps with the destination.
Return DESTADDR. */
#if HAVE_CONFIG_H
# include <config.h>
#endif
char *
memcpy (destaddr, srcaddr, len)
char *destaddr;
const char *srcaddr;
int len;
{
char *dest = destaddr;
while (len-- > 0)
*destaddr++ = *srcaddr++;
return dest;
}