diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/string.h | 4 | ||||
-rw-r--r-- | src/lib/string.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/include/string.h b/src/include/string.h index dc301ea966..30d014a006 100644 --- a/src/include/string.h +++ b/src/include/string.h @@ -20,8 +20,8 @@ char *strncpy(char *to, const char *from, size_t count); char *strcpy(char *dst, const char *src); int strcmp(const char *s1, const char *s2); int strncmp(const char *s1, const char *s2, size_t maxlen); -int strspn(const char *str, const char *spn); -int strcspn(const char *str, const char *spn); +size_t strspn(const char *str, const char *spn); +size_t strcspn(const char *str, const char *spn); char *strstr(const char *haystack, const char *needle); char *strtok_r(char *str, const char *delim, char **ptr); char *strtok(char *str, const char *delim); diff --git a/src/lib/string.c b/src/lib/string.c index 7553295a7d..b1996ff103 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -125,9 +125,9 @@ int strncmp(const char *s1, const char *s2, size_t maxlen) return 0; } -int strspn(const char *str, const char *spn) +size_t strspn(const char *str, const char *spn) { - int ret = 0; + size_t ret = 0; while (*str != 0) { const char *p; @@ -140,9 +140,9 @@ int strspn(const char *str, const char *spn) return ret; } -int strcspn(const char *str, const char *spn) +size_t strcspn(const char *str, const char *spn) { - int ret = 0; + size_t ret = 0; while (*str != 0) { const char *p; |