From 0accfd1fe1de164ca2c87c14a9d1322aafe37c4e Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Mon, 20 May 2024 15:43:33 +0100 Subject: [PATCH] ext/readline: Fix [-Wcalloc-transposed-args] compiler warning Closes GH-14280 --- ext/readline/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/readline/readline.c b/ext/readline/readline.c index db2776fb27a9a..1bd5e2fd6059a 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -456,7 +456,7 @@ char **php_readline_completion_cb(const char *text, int start, int end) matches = rl_completion_matches(text,_readline_command_generator); } else { /* libedit will read matches[2] */ - matches = calloc(sizeof(char *), 3); + matches = calloc(3, sizeof(char *)); if (!matches) { return NULL; }