]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/cxx/lib/supc++-support/src/memset.c
2760934c0d90c48fbc44c86c7be48c9e517dd2ec
[l4.git] / l4 / pkg / cxx / lib / supc++-support / src / memset.c
1 /*
2  * (c) 2004-2009 Technische Universität Dresden
3  * This file is part of TUD:OS and distributed under the terms of the
4  * GNU General Public License 2.
5  * Please see the COPYING-GPL-2 file for details.
6  *
7  * As a special exception, you may use this file as part of a free software
8  * library without restriction.  Specifically, if other files instantiate
9  * templates or use macros or inline functions from this file, or you compile
10  * this file and link it with other files to produce an executable, this
11  * file does not by itself cause the resulting executable to be covered by
12  * the GNU General Public License.  This exception does not however
13  * invalidate any other reasons why the executable file might be covered by
14  * the GNU General Public License.
15  */
16
17 #include <stddef.h>
18
19 void *memset(void *s, int c, size_t n);
20
21 void *memset(void *s, int c, size_t n)
22 {
23   size_t x;
24   char *p = s;
25   for (x=0; x<n; ++x)
26     *p++ = c;
27
28   return s;
29 }