aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_getln.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-01-15 22:20:26 +0100
committerJustin M. Keyes <justinkz@gmail.com>2019-01-18 00:09:50 +0100
commited171f7be29f7337aaba8c420406afc8a58c1613 (patch)
treeecee5c4316c5e02603b3f779ea769b4698d8d21f /src/nvim/ex_getln.c
parentdca0da4e3fa68b3da28a4571488e2c7d805615cf (diff)
downloadrneovim-ed171f7be29f7337aaba8c420406afc8a58c1613.tar.gz
rneovim-ed171f7be29f7337aaba8c420406afc8a58c1613.tar.bz2
rneovim-ed171f7be29f7337aaba8c420406afc8a58c1613.zip
PVS/V1028: cast operands, not the result
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r--src/nvim/ex_getln.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 8efb027575..32620ac3c2 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -3393,14 +3393,11 @@ void cmdline_paste_str(char_u *s, int literally)
}
}
-/*
- * Delete characters on the command line, from "from" to the current
- * position.
- */
+/// Delete characters on the command line, from "from" to the current position.
static void cmdline_del(int from)
{
memmove(ccline.cmdbuff + from, ccline.cmdbuff + ccline.cmdpos,
- (size_t)(ccline.cmdlen - ccline.cmdpos + 1));
+ (size_t)ccline.cmdlen - ccline.cmdpos + 1);
ccline.cmdlen -= ccline.cmdpos - from;
ccline.cmdpos = from;
}
@@ -3661,8 +3658,8 @@ nextwild (
xp->xp_pattern = ccline.cmdbuff + i;
}
memmove(&ccline.cmdbuff[ccline.cmdpos + difflen],
- &ccline.cmdbuff[ccline.cmdpos],
- (size_t)(ccline.cmdlen - ccline.cmdpos + 1));
+ &ccline.cmdbuff[ccline.cmdpos],
+ (size_t)ccline.cmdlen - ccline.cmdpos + 1);
memmove(&ccline.cmdbuff[i], p2, STRLEN(p2));
ccline.cmdlen += difflen;
ccline.cmdpos += difflen;