]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: Add xnew0
authoranonymix007 <48598263+anonymix007@users.noreply.github.com>
Wed, 16 Oct 2024 14:59:08 +0000 (17:59 +0300)
committeranonymix007 <48598263+anonymix007@users.noreply.github.com>
Tue, 5 Nov 2024 11:48:33 +0000 (14:48 +0300)
Same as xnew but initialized with zeros

src/boot/efi/util.h

index 054d49ef02b771baac241143f6340b68a886b439..c7634576cf48d70d92e8fb7063ad8444b58504e5 100644 (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);