cocci: allow xcalloc(1, size)
commit1c57cc70ec26529a26392539fc888486bb89b7fd
authorJunio C Hamano <gitster@pobox.com>
Tue, 16 Mar 2021 00:56:07 +0000 (15 17:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Mar 2021 00:56:07 +0000 (15 17:56 -0700)
tree61b05e45176c3d84885f43595a21d8ad05afda28
parentca56dadb4b65ccaeab809d80db80a312dc00941a
cocci: allow xcalloc(1, size)

Allocating a pre-cleared single element is quite common and it is
misleading to use CALLOC_ARRAY(); these allocations that would be
affected without this change are not allocating an array.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/coccinelle/array.cocci