Files
amiga-libnix2/libnix/sources/nix/string/memset.c
T
jshepher f5e2060927 Reimplemented bzero, bcopy and memset again. The previous ones had
subtle errors which crashed things.
2004-12-04 22:38:39 +00:00

12 lines
165 B
C
Executable File

#include <string.h>
void *memset(void *s,int c,size_t n)
{
unsigned char *ch = (unsigned char *)s;
while (n > 0) {
*ch++ = c;
n--;
}
return s;
}