From: Andreas Schneider Date: Mon, 3 Dec 2018 14:32:55 +0000 (+0100) Subject: replace: Add ZERO_ARRAY_LEN() macro X-Git-Tag: tdb-1.4.1~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d1d44dcb72f24aa078dd050da0c7c1aecd3513e;p=thirdparty%2Fsamba.git replace: Add ZERO_ARRAY_LEN() macro Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 212ed265d4a..1658465866e 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -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. */