diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/klee-libc/mempcpy.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/runtime/klee-libc/mempcpy.c b/runtime/klee-libc/mempcpy.c index 31712251..c1cc175c 100644 --- a/runtime/klee-libc/mempcpy.c +++ b/runtime/klee-libc/mempcpy.c @@ -7,13 +7,10 @@ // //===----------------------------------------------------------------------===*/ -#include <stdlib.h> +#undef _GNU_SOURCE -void *mempcpy(void *destaddr, void const *srcaddr, size_t len) { - char *dest = destaddr; - char const *src = srcaddr; +#include <string.h> - while (len-- > 0) - *dest++ = *src++; - return dest; +void *mempcpy(void *destaddr, void const *srcaddr, size_t len) { + return (char *)memcpy(destaddr, srcaddr, len) + len; } |