diff --git a/src/memory.c b/src/memory.c index 3e79f3a4..dd59c758 100644 --- a/src/memory.c +++ b/src/memory.c @@ -62,7 +62,7 @@ Estrdup(const char *s) } char * -Estrndup(const char *s, int n) +Estrndup(const char *s, size_t n) { #if USE_LIBC_STRNDUP if (s) diff --git a/src/util.h b/src/util.h index a6b72f13..6b7727e9 100644 --- a/src/util.h +++ b/src/util.h @@ -54,7 +54,7 @@ char *Estrtrim(char *s); char *Estrdup(const char *s); -char *Estrndup(const char *s, int n); +char *Estrndup(const char *s, size_t n); char *Estrdupcat2(char *ss, const char *s1, const char *s2); char **StrlistDup(char **lst, int num);