reset to size_t

This commit is contained in:
reccetear 2017-04-21 17:20:03 +08:00
parent c66ebe98a7
commit e453de93ac
2 changed files with 3 additions and 3 deletions

View File

@ -16,7 +16,7 @@ extern "C" {
// memcpy, memset, strcpy, strlen, itoa, atoi, ...
// kalloc, kree
int strlen(const char *s);
size_t strlen(const char *s);
#ifdef __cplusplus
}

View File

@ -1,7 +1,7 @@
#include <klib.h>
int strlen(const char *s) {
int sz = 0;
size_t strlen(const char *s) {
size_t sz = 0;
for (; *s; s ++) {
sz ++;
}