aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-08-29 14:55:14 -0700
committerJunio C Hamano <gitster@pobox.com>2022-08-29 14:55:14 -0700
commitedc4f6d280392b8ba512441860d9b5c43657f5ae (patch)
tree30c2a1f1792b918a2cc26c0d0bcde0819f03f3dd
parent56ba6245a4c171dd03ab3667e9e99c1eaac46e72 (diff)
parentc4bbd9bb8fd307c3c8be16121391416a5685ffe1 (diff)
downloadgit-edc4f6d280392b8ba512441860d9b5c43657f5ae.tar.xz
Merge branch 'sg/xcalloc-cocci-fix'
xcalloc(), imitating calloc(), takes "number of elements of the array", and "size of a single element", in this order. A call that does not follow this ordering has been corrected. * sg/xcalloc-cocci-fix: promisor-remote: fix xcalloc() argument order
-rw-r--r--promisor-remote.c2
1 files changed, 1 insertions, 1 deletions
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);