]> git.lizzy.rs Git - plan9front.git/blob - sys/src/libc/port/memset.c
431d6bb304c1118d837495f127310dcf6167ca00
[plan9front.git] / sys / src / libc / port / memset.c
1 #include        <u.h>
2 #include        <libc.h>
3
4 void*
5 memset(void *ap, int c, ulong n)
6 {
7         char *p;
8
9         p = ap;
10         while(n > 0) {
11                 *p++ = c;
12                 n--;
13         }
14         return ap;
15 }