1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-03-02 19:15:18 +02:00
Files
coreutils/lib/memcpy.c
1995-07-30 05:30:04 +00:00

17 lines
336 B
C

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