]> git.ipfire.org Git - thirdparty/git.git/commit
cocci: extend MEMZERO_ARRAY() rules
authorToon Claes <toon@iotcl.com>
Tue, 3 Feb 2026 10:29:03 +0000 (11:29 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Feb 2026 17:41:52 +0000 (09:41 -0800)
commit60614838a44591c1449f939236f396bb7164b5ef
treed537458b0c4a08a8e8e6c15969ec40a43497516f
parent67ad42147a7acc2af6074753ebd03d904476118f
cocci: extend MEMZERO_ARRAY() rules

Recently the MEMZERO_ARRAY() macro was introduced. In that commit also
coccinelle rules were added to capture cases that can be converted to
use that macro.

Later a few more cases were manually converted to use the macro, but
coccinelle didn't capture those. Extend the rules to capture those as
well.

In various cases the code could be further beautified by removing
parentheses which are no longer needed. Modify the coccinelle rules to
optimize those as well and fix them.

During conversion indentation also used spaces where tabs should be
used, fix that in one go.

Signed-off-by: Toon Claes <toon@iotcl.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/array.cocci
diffcore-delta.c
ewah/bitmap.c