xmalloc: add xreallocarray()

This commit is contained in:
Daniel Eklöf 2025-01-30 09:06:24 +01:00
parent 9443ac7e29
commit aae794e9bd
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 0 deletions

View file

@ -12,6 +12,7 @@
void *xmalloc(size_t size) XMALLOC;
void *xcalloc(size_t nmemb, size_t size) XMALLOC;
void *xrealloc(void *ptr, size_t size);
void *xreallocarray(void *ptr, size_t n, 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;