about summary refs log tree commit diff homepage
path: root/runtime/klee-libc/memcpy.c
blob: 7f7f133d25166c393aec3fc2e5b087486e32de39 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//===-- memcpy.c ----------------------------------------------------------===//
//
//                     The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include <stdlib.h>

void *memcpy(void *destaddr, void const *srcaddr, size_t len) {
  char *dest = destaddr;
  char const *src = srcaddr;

  while (len-- > 0)
    *dest++ = *src++;
  return destaddr;
}