Commit 1943a615 authored by Oliver Horst's avatar Oliver Horst
Browse files

[chg] Small correction to the memset function

parent da78d10b
......@@ -2,11 +2,12 @@
void *memset(void *s, int c, size_t n)
char *sp = s;
int i;
uint8_t *sp = (uint8_t *)s;
uint8_t x = c & 0xff;
size_t i;
for (i = 0; i < n; i++)
sp[i] = c;
for (i = 0; i < n; i++)
sp[i] = x;
return s;
return s;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment