Re: [PATCH v2] last-modified: fix use of uninitialized memory
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 9, 2025, 12:18 UTC
- Message-ID
- <xmqqpl8nkfwh.fsf@gitster.g>
- In-Reply-To
- <871pl4vyd5.fsf@iotcl.com>
Toon Claes <toon@iotcl.com> writes:
Show 5 quoted lines
> Junio C Hamano <gitster@pobox.com> writes: > >> Sorry, but hasn't the old one already been cooking in 'next'? > > Okay, fine by me. Let's abandon this v2 then.
Understood. I however agree with Patrick that rewriting
memset(ptr, '\0', sizeof(*ptr) * nr)
to use CLEAR_ARRAY(), not limited to last-modified but everywhere in the codebase, may not be a bad idea. It would be a good exercise to hone our Coccinelle skill ;-)