summaryrefslogtreecommitdiff
path: root/libc/string/generic/mempcpy.c
blob: 7c251914df5e1fd83e9ebacc5ccb6c7728ed4418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Copy memory to memory until the specified number of bytes
   has been copied, return pointer to following byte.
   Overlap is NOT handled correctly.
*/

/* Ditch the glibc version and just wrap memcpy. */

#include <string.h>

libc_hidden_proto(mempcpy)
libc_hidden_proto(memcpy)

void *mempcpy (void *dstpp, const void *srcpp, size_t len)
{
  memcpy(dstpp, srcpp, len);
  return (void *)(((char *)dstpp) + len);
}
libc_hidden_def(mempcpy)