summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/string.h4
-rw-r--r--src/lib/string.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/include/string.h b/src/include/string.h
index e752f8f531..dc301ea966 100644
--- a/src/include/string.h
+++ b/src/include/string.h
@@ -16,10 +16,10 @@ char *strconcat(const char *s1, const char *s2);
size_t strnlen(const char *src, size_t max);
size_t strlen(const char *src);
char *strchr(const char *s, int c);
-char *strncpy(char *to, const char *from, int count);
+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, int maxlen);
+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);
char *strstr(const char *haystack, const char *needle);
diff --git a/src/lib/string.c b/src/lib/string.c
index d23ed1f7e5..7553295a7d 100644
--- a/src/lib/string.c
+++ b/src/lib/string.c
@@ -71,7 +71,7 @@ char *strrchr(const char *s, int c)
return p;
}
-char *strncpy(char *to, const char *from, int count)
+char *strncpy(char *to, const char *from, size_t count)
{
char *ret = to;
char data;
@@ -113,7 +113,7 @@ int strcmp(const char *s1, const char *s2)
return r;
}
-int strncmp(const char *s1, const char *s2, int maxlen)
+int strncmp(const char *s1, const char *s2, size_t maxlen)
{
int i;