blob: 5863d445eab16f558119472a4b981d9c8c9eb057 [file] [log] [blame]
Jeff Thompsonf418fe02013-06-27 17:28:55 -07001/*
2 * Author: Jeff Thompson
3 *
4 * BSD license, See the LICENSE file for more information.
5 */
6
7#include "ndn_memory.h"
8
9#if !HAVE_MEMCPY
10void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len)
11{
12 unsigned int i;
13
14 for (i = 0; i < len; i++)
15 dest[i] = src[i];
16}
17#endif
18
19#if !HAVE_MEMSET
20void ndn_memset(unsigned char *dest, int val, unsigned int len)
21{
22 unsigned int i;
23
24 for (i = 0; i < len; i++)
25 dest[i] = (unsigned char)val;
26}
27#endif