diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-12-23 11:33:16 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-23 11:33:16 +0900 |
| commit | 396df67739bed1615e92071961e3e4d2bf378c16 (patch) | |
| tree | aebed06b96b6cb69243d1eccab1c0450068f89c7 /builtin | |
| parent | c77ba76807f30c2d69febbe8ad1f6b03ba4314f1 (diff) | |
| parent | 467860bc0b0447093ae97bcecf1655131732338f (diff) | |
Merge branch 'tc/memzero-array'
MEMZERO_ARRAY() helper is introduced to avoid clearing only the
first N bytes of an N-element array whose elements are larger than
a byte.
* tc/memzero-array:
contrib/coccinelle: pass include paths to spatch(1)
git-compat-util: introduce MEMZERO_ARRAY() macro
Diffstat (limited to 'builtin')
| -rw-r--r-- | builtin/last-modified.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/last-modified.c b/builtin/last-modified.c index 7345665a92..c80f0535f6 100644 --- a/builtin/last-modified.c +++ b/builtin/last-modified.c @@ -327,7 +327,7 @@ static void process_parent(struct last_modified *lm, if (!(parent->object.flags & PARENT1)) active_paths_free(lm, parent); - memset(lm->scratch->words, 0x0, lm->scratch->word_alloc * sizeof(eword_t)); + MEMZERO_ARRAY(lm->scratch->words, lm->scratch->word_alloc); diff_queue_clear(&diff_queued_diff); } |
