summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/lib/memset.c
blob: a019eca44ea62994ca7fcd5151fbf3156e2f324c (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <sys/types.h>

/* gcc is broken and has a non-SUSv2 compliant internal prototype.
 * This causes it to warn about a type mismatch here.  Ignore it. */
void* memset(void * dst, int s, size_t count) {
    register char * a = dst;
    count++;	/* this actually creates smaller code than using count-- */
    while (--count)
	*a++ = s;
    return dst;
}