Skip to content

Commit c61614e

Browse files
committed
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
2 parents aa31cb8 + c4bbd9b commit c61614e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

promisor-remote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static void promisor_remote_init(struct repository *r)
146146
if (r->promisor_remote_config)
147147
return;
148148
config = r->promisor_remote_config =
149-
xcalloc(sizeof(*r->promisor_remote_config), 1);
149+
xcalloc(1, sizeof(*r->promisor_remote_config));
150150
config->promisors_tail = &config->promisors;
151151

152152
repo_config(r, promisor_remote_config, config);

0 commit comments

Comments
 (0)