diff options
| author | Toon Claes <toon@iotcl.com> | 2025-12-10 14:13:01 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-11 14:44:43 +0900 |
| commit | a67b902c94a2f33275a3947a8bcdab03f64ae75e (patch) | |
| tree | c5e00364a71a55934e1d2c13abf31a7474e5478d /compat | |
| parent | af0ed97e1031f2709dbd4fc4f40c4ded711acd49 (diff) | |
| download | git-a67b902c94a2f33275a3947a8bcdab03f64ae75e.tar.xz | |
git-compat-util: introduce MEMZERO_ARRAY() macro
Introduce a new macro MEMZERO_ARRAY() that zeroes the memory allocated
by ALLOC_ARRAY() and friends. And add coccinelle rule to enforce the use
of this macro.
Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
| -rw-r--r-- | compat/simple-ipc/ipc-win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/simple-ipc/ipc-win32.c b/compat/simple-ipc/ipc-win32.c index a8fc812adf..4a3e7df9c7 100644 --- a/compat/simple-ipc/ipc-win32.c +++ b/compat/simple-ipc/ipc-win32.c @@ -686,7 +686,7 @@ static LPSECURITY_ATTRIBUTES get_sa(struct my_sa_data *d) goto fail; } - memset(ea, 0, NR_EA * sizeof(EXPLICIT_ACCESS)); + MEMZERO_ARRAY(ea, NR_EA); ea[0].grfAccessPermissions = GENERIC_READ | GENERIC_WRITE; ea[0].grfAccessMode = SET_ACCESS; |
