boot: Add xnew0

Same as xnew but initialized with zeros
This commit is contained in:
anonymix007 2024-10-16 17:59:08 +03:00
parent ee95e86ae1
commit 09f16de6d8

View File

@ -69,6 +69,7 @@ static inline void* xmemdup(const void *p, size_t l) {
}
#define xnew(type, n) ((type *) xmalloc_multiply((n), sizeof(type)))
#define xnew0(type, n) ((type *) xcalloc_multiply((n), sizeof(type)))
bool free_and_xstrdup16(char16_t **p, const char16_t *s);