summaryrefslogtreecommitdiffstats
path: root/promisor-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-09-13 21:21:09 +0200
committerJunio C Hamano <gitster@pobox.com>2022-09-13 21:21:09 +0200
commitc61614e30f6df550a5d48fc115fb6a92266ecf50 (patch)
tree656c0d10c1a45b3e62a77b813dee3f9a0eca0848 /promisor-remote.c
parentMerge branch 'jk/pipe-command-nonblock' into maint (diff)
parentpromisor-remote: fix xcalloc() argument order (diff)
downloadgit-c61614e30f6df550a5d48fc115fb6a92266ecf50.tar.xz
git-c61614e30f6df550a5d48fc115fb6a92266ecf50.zip
Merge branch 'sg/xcalloc-cocci-fix' into maint
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
Diffstat (limited to 'promisor-remote.c')
-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);