summaryrefslogtreecommitdiffstats
path: root/XUtils.h
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-09-10 15:09:42 +0200
committerBenBE <BenBE@geshi.org>2021-09-11 00:04:00 +0200
commitbf395e10c52094c44b1a6e0b7fedc35c35de0641 (patch)
tree6fc0e58e1a31c5c34f8e372b05e449fb2d170070 /XUtils.h
parent8f259bc5e1b9a6a95c16b971cf4733cf76725c96 (diff)
Add xReallocArrayZero() helper
Add helper function to reallocate an dynamic allocated array including zeroing the newly allocated memory.
Diffstat (limited to 'XUtils.h')
-rw-r--r--XUtils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/XUtils.h b/XUtils.h
index 8a6ee37e..13f4be4b 100644
--- a/XUtils.h
+++ b/XUtils.h
@@ -30,6 +30,8 @@ void* xRealloc(void* ptr, size_t size) ATTR_ALLOC_SIZE1(2);
void* xReallocArray(void* ptr, size_t nmemb, size_t size) ATTR_ALLOC_SIZE2(2, 3);
+void* xReallocArrayZero(void* ptr, size_t prevmemb, size_t newmemb, size_t size) ATTR_ALLOC_SIZE2(3, 4);
+
/*
* String_startsWith gives better performance if strlen(match) can be computed
* at compile time (e.g. when they are immutable string literals). :)

© 2014-2024 Faster IT GmbH | imprint | privacy policy