Skip to contentSkip to conversation

SQUASH??? calloc(nmemb,size)

PATCH In review Junio C Hamano 2 participants 2 messages Mar 11, 2021 – Mar 15, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SQUASH??? calloc(nmemb,size)

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(-)
refs/reftable-backend.c +1 -1
index b7d12ca91d..6faad8ce50 100644
@@ -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;
 
Signature · 1 line
2.31.0-rc2-173-g36b77366ca
#1 lore raw
Quoted 4 lines · Junio C Hamano

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

folded in, thanks.

Signature · 11 lines
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