setos

拙OS
Log | Files | Refs | LICENSE

memset.c (134B)


      1 #include <libc.h>
      2 
      3 void *
      4 memset(void *s, int c, uintptr n)
      5 {
      6 	void *s0 = s;
      7 	for (; n > 0; n--) {
      8 		*(int *)s++ = c;
      9 	}
     10 	return s0;
     11 }