xref: /haiku/src/system/libroot/posix/string/arch/generic/memset.c (revision 8d2bf6953e851d431fc67de1bc970c40afa79e9f)
1 /*
2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 
6 #include <sys/types.h>
7 #include <string.h>
8 
9 
10 void *
11 memset(void *s, int c, size_t count)
12 {
13 	char *xs = (char *) s;
14 
15 	while (count--)
16 		*xs++ = c;
17 
18 	return s;
19 }
20