diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-06-07 20:49:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-06-07 20:49:05 +0200 |
commit | df44a27b53586fccfc6a3aedc89061fdd9a515ff (patch) | |
tree | 2d0ca2790b3e106a7d8f059951160789167a17a1 /src/dict.c | |
parent | da84ac2a6f467d0b9eddcc8709433cda75d16a41 (diff) | |
download | vim-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/dict.c')
-rw-r--r-- | src/dict.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dict.c b/src/dict.c index 3824f407c..9d9426198 100644 --- a/src/dict.c +++ b/src/dict.c @@ -779,7 +779,7 @@ get_literal_key(char_u **arg, typval_T *tv) for (p = *arg; ASCII_ISALNUM(*p) || *p == '_' || *p == '-'; ++p) ; tv->v_type = VAR_STRING; - tv->vval.v_string = vim_strnsave(*arg, (int)(p - *arg)); + tv->vval.v_string = vim_strnsave(*arg, p - *arg); *arg = skipwhite(p); return OK; |