Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (20 sloc) 0.318 kb
/* public domain rewrite of memcmp(3) */
void *
memmove (d, s, n)
void *d, *s;
int n;
char *dst = d;
char *src = s;
void *ret = dst;
if (src < dst) {
src += n;
dst += n;
while (n--)
*--dst = *--src;
else if (dst < src)
while (n--)
*dst++ = *src++;
return ret;
Jump to Line
Something went wrong with that request. Please try again.