aboutsummaryrefslogtreecommitdiffstats
path: root/compat/regex/regex_internal.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-31 15:28:19 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-31 15:28:20 -0700
commit73049492d5414376d3f0d788043218059e87f027 (patch)
tree3e38f0861e9f8f78075cd3fbe378c7d43a89fbd2 /compat/regex/regex_internal.c
parent1258fc2b08543bac83aea5ad856b4a64348c3c79 (diff)
parentf01301aabe1771473b7c97fec72a566963c5fe34 (diff)
downloadgit-73049492d5414376d3f0d788043218059e87f027.tar.gz
Merge branch 'jc/compat-regex-calloc-fix' into maint-2.45
Windows CI running in GitHub Actions started complaining about the order of arguments given to calloc(); the imported regex code uses the wrong order almost consistently, which has been corrected. * jc/compat-regex-calloc-fix: compat/regex: fix argument order to calloc(3)
Diffstat (limited to 'compat/regex/regex_internal.c')
-rw-r--r--compat/regex/regex_internal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/regex/regex_internal.c b/compat/regex/regex_internal.c
index ec51cf3446..ec5cc5d2dd 100644
--- a/compat/regex/regex_internal.c
+++ b/compat/regex/regex_internal.c
@@ -1628,7 +1628,7 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
reg_errcode_t err;
re_dfastate_t *newstate;
- newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ newstate = (re_dfastate_t *) calloc (1, sizeof (re_dfastate_t));
if (BE (newstate == NULL, 0))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);
@@ -1678,7 +1678,7 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
reg_errcode_t err;
re_dfastate_t *newstate;
- newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ newstate = (re_dfastate_t *) calloc (1, sizeof (re_dfastate_t));
if (BE (newstate == NULL, 0))
return NULL;
err = re_node_set_init_copy (&newstate->nodes, nodes);