]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
replace: Add ZERO_ARRAY_LEN() macro
authorAndreas Schneider <asn@samba.org>
Mon, 3 Dec 2018 14:32:55 +0000 (15:32 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 30 Apr 2019 23:18:26 +0000 (23:18 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/replace/replace.h

index 212ed265d4ab5e14ddb27c2cfda354c358cee239..1658465866e06c02d543cdbc6056f2bfd4118405 100644 (file)
@@ -836,6 +836,11 @@ typedef unsigned long long ptrdiff_t ;
  */
 #define ZERO_ARRAY(x) memset_s((char *)(x), sizeof(x), 0, sizeof(x))
 
+/**
+ * Zero a given len of an array
+ */
+#define ZERO_ARRAY_LEN(x, l) memset_s((char *)(x), (l), 0, (l))
+
 /**
  * Work out how many elements there are in a static array.
  */