aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-05-11 08:11:15 +0800
committerGitHub <noreply@github.com>2024-05-11 08:11:15 +0800
commit8c7a8be27437d8f2d640daf1c2598d4c18933e04 (patch)
treed9d786e4df879e285205eebf4447b5f3aabc352d /src
parenta2c158ad063bef6d43687dcf78956cd4e56717e4 (diff)
downloadrneovim-8c7a8be27437d8f2d640daf1c2598d4c18933e04.tar.gz
rneovim-8c7a8be27437d8f2d640daf1c2598d4c18933e04.tar.bz2
rneovim-8c7a8be27437d8f2d640daf1c2598d4c18933e04.zip
fix: transposed xcalloc arguments (#28695)
Diffstat (limited to 'src')
-rw-r--r--src/nvim/decoration.c2
-rw-r--r--src/nvim/strings.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/decoration.c b/src/nvim/decoration.c
index e10f1ec4f1..38b4f8f204 100644
--- a/src/nvim/decoration.c
+++ b/src/nvim/decoration.c
@@ -790,7 +790,7 @@ void buf_signcols_count_range(buf_T *buf, int row1, int row2, int add, TriState
}
// Allocate an array of integers holding the number of signs in the range.
- int *count = xcalloc(sizeof(int), (size_t)(row2 + 1 - row1));
+ int *count = xcalloc((size_t)(row2 + 1 - row1), sizeof(int));
MarkTreeIter itr[1];
MTPair pair = { 0 };
diff --git a/src/nvim/strings.c b/src/nvim/strings.c
index a04aaa8f60..cc61b24f16 100644
--- a/src/nvim/strings.c
+++ b/src/nvim/strings.c
@@ -943,7 +943,7 @@ static int adjust_types(const char ***ap_types, int arg, int *num_posarg, const
{
if (*ap_types == NULL || *num_posarg < arg) {
const char **new_types = *ap_types == NULL
- ? xcalloc(sizeof(const char *), (size_t)arg)
+ ? xcalloc((size_t)arg, sizeof(const char *))
: xrealloc(*ap_types, (size_t)arg * sizeof(const char *));
for (int idx = *num_posarg; idx < arg; idx++) {