summaryrefslogtreecommitdiff
path: root/src/digraph.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-06-07 20:49:05 +0200
committerBram Moolenaar <Bram@vim.org>2020-06-07 20:49:05 +0200
commitdf44a27b53586fccfc6a3aedc89061fdd9a515ff (patch)
tree2d0ca2790b3e106a7d8f059951160789167a17a1 /src/digraph.c
parentda84ac2a6f467d0b9eddcc8709433cda75d16a41 (diff)
downloadvim-git-df44a27b53586fccfc6a3aedc89061fdd9a515ff.tar.gz
patch 8.2.0928: many type casts are used for vim_strnsave()v8.2.0928
Problem: Many type casts are used for vim_strnsave(). Solution: Make the length argument size_t instead of int. (Ken Takata, closes #5633) Remove some type casts.
Diffstat (limited to 'src/digraph.c')
-rw-r--r--src/digraph.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/digraph.c b/src/digraph.c
index dd5920a24..d4175d5db 100644
--- a/src/digraph.c
+++ b/src/digraph.c
@@ -2387,10 +2387,10 @@ ex_loadkeymap(exarg_T *eap)
{
kp = (kmap_T *)curbuf->b_kmap_ga.ga_data + curbuf->b_kmap_ga.ga_len;
s = skiptowhite(p);
- kp->from = vim_strnsave(p, (int)(s - p));
+ kp->from = vim_strnsave(p, s - p);
p = skipwhite(s);
s = skiptowhite(p);
- kp->to = vim_strnsave(p, (int)(s - p));
+ kp->to = vim_strnsave(p, s - p);
if (kp->from == NULL || kp->to == NULL
|| STRLEN(kp->from) + STRLEN(kp->to) >= KMAP_LLEN