summaryrefslogtreecommitdiff
path: root/src/lib/memset.c
blob: fc87c8a7bd13d5a8bb2ed73f3b6c0f36d5aed89e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* SPDX-License-Identifier: GPL-2.0-only */

#include <string.h>

void *memset(void *s, int c, size_t n)
{
	int i;
	char *ss = (char *) s;

	for (i = 0; i < (int)n; i++)
		ss[i] = c;

	return s;
}