aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/vim.c
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2021-07-26 20:30:10 +0200
committerGitHub <noreply@github.com>2021-07-26 20:30:10 +0200
commitec7881bbfd0b41812b39c658cb7c4be7993d113e (patch)
tree5dda2c4cdd848b191f6d57a5cd875680f4f7ce6d /src/nvim/api/vim.c
parent0e22a40b6d328ac4aa07ed7bc40da200a48ef524 (diff)
parent3fd4f2f611b60dabdac386f201efe92f52cbf18c (diff)
downloadrneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.tar.gz
rneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.tar.bz2
rneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.zip
Merge pull request #15180 from gpanders/xcalloc
fix: fix incorrect call sites of xcalloc
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r--src/nvim/api/vim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c
index 9b0782f589..bbcfe173c5 100644
--- a/src/nvim/api/vim.c
+++ b/src/nvim/api/vim.c
@@ -1696,7 +1696,7 @@ void nvim_put(ArrayOf(String) lines, String type, Boolean after,
FUNC_API_SINCE(6)
FUNC_API_CHECK_TEXTLOCK
{
- yankreg_T *reg = xcalloc(sizeof(yankreg_T), 1);
+ yankreg_T *reg = xcalloc(1, sizeof(yankreg_T));
if (!prepare_yankreg_from_object(reg, type, lines.size)) {
api_set_error(err, kErrorTypeValidation, "Invalid type: '%s'", type.data);
goto cleanup;