diff --git a/bolt/runtime/common.h b/bolt/runtime/common.h --- a/bolt/runtime/common.h +++ b/bolt/runtime/common.h @@ -103,9 +103,11 @@ return Dest; } -void memset(char *Buf, char C, uint32_t Size) { +void *memset(void *Buf, int C, size_t Size) { + char *S = (char *)Buf; for (int I = 0; I < Size; ++I) - *Buf++ = C; + *S++ = C; + return Buf; } int memcmp(const void *s1, const void *s2, size_t n) {