comparison target-utils/libc/memset.c @ 91:659fa1a26269

target-utils/libc: non-optimized C implementation of memset for the sake of completeness and compliance
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 28 Oct 2016 23:15:01 +0000
parents
children
comparison
equal deleted inserted replaced
90:8dc062c6359b 91:659fa1a26269
1 #include <sys/types.h>
2
3 u_char *
4 memset(buf, c, n)
5 u_char *buf;
6 int c;
7 unsigned n;
8 {
9 u_char *p = buf;
10
11 for (; n; n--)
12 *p++ = c;
13 return buf;
14 }