diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-09-13 21:21:09 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-13 21:21:09 +0200 |
commit | c61614e30f6df550a5d48fc115fb6a92266ecf50 (patch) | |
tree | 656c0d10c1a45b3e62a77b813dee3f9a0eca0848 /promisor-remote.c | |
parent | Merge branch 'jk/pipe-command-nonblock' into maint (diff) | |
parent | promisor-remote: fix xcalloc() argument order (diff) | |
download | git-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.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); |