xmalloc: add xrealloc() and xstrndup() functions

This commit is contained in:
Craig Barnes 2020-08-07 01:05:04 +01:00
parent 22eed3e579
commit 4564c82513
2 changed files with 15 additions and 0 deletions

View file

@ -5,5 +5,7 @@
void *xmalloc(size_t size) XMALLOC;
void *xcalloc(size_t nmemb, size_t size) XMALLOC;
void *xrealloc(void *ptr, size_t size);
char *xstrdup(const char *str) XSTRDUP;
char *xstrndup(const char *str, size_t n) XSTRDUP;
char *xasprintf(const char *format, ...) PRINTF(1) XMALLOC;