diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-08-30 00:55:14 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-08-30 00:55:14 +0300 |
commit | edc4f6d280392b8ba512441860d9b5c43657f5ae (patch) | |
tree | 30c2a1f1792b918a2cc26c0d0bcde0819f03f3dd | |
parent | 56ba6245a4c171dd03ab3667e9e99c1eaac46e72 (diff) | |
parent | c4bbd9bb8fd307c3c8be16121391416a5685ffe1 (diff) |
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.c | 2 |
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); |