shithub: riscv

ref: e4a57c8b8a6b099d73d5ebdb97db493f1166e413
dir: /sys/src/libc/port/memset.c/

View raw version
#include	<u.h>
#include	<libc.h>

void*
memset(void *ap, int c, ulong n)
{
	char *p;

	p = ap;
	while(n > 0) {
		*p++ = c;
		n--;
	}
	return ap;
}