[PATCH] SQUASH??? calloc(nmemb,size)

Subsystems: the rest

STALE2033d

2 messages, 2 authors, 2021-03-15 · open the first message on its own page

[PATCH] SQUASH??? calloc(nmemb,size)

From: Junio C Hamano <hidden>
Date: 2021-03-11 18:03:32

Please squash this in to an appropriate step in your series;
otherwise it triggers a Coccinelle check when merged to 'seen'.

Thanks.

 refs/reftable-backend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index b7d12ca91d..6faad8ce50 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -996,7 +996,7 @@ static struct ref_iterator_vtable git_reftable_reflog_ref_iterator_vtable = {
 static struct ref_iterator *
 git_reftable_reflog_iterator_begin(struct ref_store *ref_store)
 {
-	struct git_reftable_reflog_ref_iterator *ri = xcalloc(sizeof(*ri), 1);
+	struct git_reftable_reflog_ref_iterator *ri = xcalloc(1, sizeof(*ri));
 	struct git_reftable_ref_store *refs =
 		(struct git_reftable_ref_store *)ref_store;
 
-- 
2.31.0-rc2-173-g36b77366ca

Re: [PATCH] SQUASH??? calloc(nmemb,size)

From: Han-Wen Nienhuys <hidden>
Date: 2021-03-15 10:26:01

On Thu, Mar 11, 2021 at 7:02 PM Junio C Hamano [off-list ref] wrote:
Please squash this in to an appropriate step in your series;
otherwise it triggers a Coccinelle check when merged to 'seen'.
folded in, thanks.

-- 
Han-Wen Nienhuys - Google Munich
I work 80%. Don't expect answers from me on Fridays.
--

Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help