Add ecalloc() and commented out recalloc().

Use inline strnlen() instead of strlen() in estrndup().
This commit is contained in:
Todd C. Miller
2012-03-19 11:23:25 -04:00
parent 9eeacad6d9
commit dbbb48c45f
2 changed files with 59 additions and 4 deletions

View File

@@ -22,10 +22,12 @@
int easprintf(char **, const char *, ...) __printflike(2, 3);
int evasprintf(char **, const char *, va_list) __printflike(2, 0);
void efree(void *);
void *ecalloc(size_t, size_t);
void *emalloc(size_t);
void *emalloc2(size_t, size_t);
void *erealloc(void *, size_t);
void *erealloc3(void *, size_t, size_t);
void *erecalloc(void *, size_t, size_t, size_t);
char *estrdup(const char *);
char *estrndup(const char *, size_t);