summaryrefslogtreecommitdiff
path: root/src/common/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/string.c')
-rw-r--r--src/common/string.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/string.c b/src/common/string.c
index b2ec309..120fd5d 100644
--- a/src/common/string.c
+++ b/src/common/string.c
@@ -1,5 +1,5 @@
#include <string.h>
-#include <stdlib.h>
+#include <stdlib_common.h>
int strlen(const char *str) {
int i = 0;
@@ -63,10 +63,11 @@ void *memcpy(void *vd, const void *vs, int count) {
return vd;
}
-uint8_t *memset(uint8_t *dest, uint8_t val, int count) {
+void *memset(void *dest, int val, int count) {
+ uint8_t *dest_c = (uint8_t*)dest;
int i;
for (i = 0; i < count; i++) {
- dest[i] = val;
+ dest_c[i] = val;
}
return dest;
}