mirror of
https://github.com/git/git.git
synced 2024-06-06 11:26:10 +02:00
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
This commit is contained in:
commit
c61614e30f
|
@ -146,7 +146,7 @@ static void promisor_remote_init(struct repository *r)
|
||||||
if (r->promisor_remote_config)
|
if (r->promisor_remote_config)
|
||||||
return;
|
return;
|
||||||
config = r->promisor_remote_config =
|
config = r->promisor_remote_config =
|
||||||
xcalloc(sizeof(*r->promisor_remote_config), 1);
|
xcalloc(1, sizeof(*r->promisor_remote_config));
|
||||||
config->promisors_tail = &config->promisors;
|
config->promisors_tail = &config->promisors;
|
||||||
|
|
||||||
repo_config(r, promisor_remote_config, config);
|
repo_config(r, promisor_remote_config, config);
|
||||||
|
|
Loading…
Reference in New Issue