[PATCH] promisor-remote: fix xcalloc() argument order

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pass the number of elements first and their size second, as expected
by xcalloc().

Patch generated with 'contrib/coccinelle/xcalloc.cocci' and Coccinelle
v1.0.7 or later (previous Coccinelle versions don't notice this).

Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx>
---
 promisor-remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/promisor-remote.c b/promisor-remote.c
index 5b33f88bca..68f46f5ec7 100644
--- a/promisor-remote.c
+++ b/promisor-remote.c
@@ -146,7 +146,7 @@ static void promisor_remote_init(struct repository *r)
 	if (r->promisor_remote_config)
 		return;
 	config = r->promisor_remote_config =
-		xcalloc(sizeof(*r->promisor_remote_config), 1);
+		xcalloc(1, sizeof(*r->promisor_remote_config));
 	config->promisors_tail = &config->promisors;
 
 	repo_config(r, promisor_remote_config, config);
-- 
2.37.2.880.g3b8fb2ce68




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux