Thread (4 messages) 4 messages, 2 authors, 2022-08-23

Re: [PATCH] promisor-remote: fix xcalloc() argument order

From: Junio C Hamano <hidden>
Date: 2022-08-23 01:09:51

Junio C Hamano [off-list ref] writes:
...  FWIW, "make coccicheck" with what I happen to have
notices it.
Oops, that was a serious typo.  "notices" -> "fails to notice".
$ spatch version
spatch version 1.1.1 compiled with OCaml version 4.13.1
Flags passed to the configure script: --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --enable-ocaml --enable-python --enable-opt
OCaml scripting support: yes
Python scripting support: yes
Syntax of regular expressions: PCRE

Anyway, the patch is correct.

Thanks, will queue.
quoted
Signed-off-by: SZEDER Gábor <redacted>
---
 promisor-remote.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help