freebsd-dev/contrib/gcc/config/memmove.c
Peter Wemm 497e80a371 Reorganize the gcc vendor import work area. This flattens out a bunch
of unnecessary path components that are relics of cvs2svn.

(These are directory moves)
2008-06-01 00:03:21 +00:00

21 lines
344 B
C

/* Public domain. */
#include <stddef.h>
void *
memmove (void *dest, const void *src, size_t len)
{
char *d = dest;
const char *s = src;
if (d < s)
while (len--)
*d++ = *s++;
else
{
char *lasts = s + (len-1);
char *lastd = d + (len-1);
while (len--)
*lastd-- = *lasts--;
}
return dest;
}