From 09f16de6d8f44b45a84750e2829399c0c83634de Mon Sep 17 00:00:00 2001 From: anonymix007 <48598263+anonymix007@users.noreply.github.com> Date: Wed, 16 Oct 2024 17:59:08 +0300 Subject: [PATCH] boot: Add xnew0 Same as xnew but initialized with zeros --- src/boot/efi/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/boot/efi/util.h b/src/boot/efi/util.h index 054d49ef02..c7634576cf 100644 --- a/src/boot/efi/util.h +++ b/src/boot/efi/util.h @@ -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); -- 2.25.1