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/autocmd.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/autocmd.c')
-rw-r--r-- | src/autocmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autocmd.c b/src/autocmd.c index d6945f306..937e74187 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -763,7 +763,7 @@ au_event_disable(char *what) save_ei = vim_strsave(p_ei); if (save_ei != NULL) { - new_ei = vim_strnsave(p_ei, (int)(STRLEN(p_ei) + STRLEN(what))); + new_ei = vim_strnsave(p_ei, STRLEN(p_ei) + STRLEN(what)); if (new_ei != NULL) { if (*what == ',' && *p_ei == NUL) @@ -991,7 +991,7 @@ au_get_grouparg(char_u **argp) ; if (p > arg) { - group_name = vim_strnsave(arg, (int)(p - arg)); + group_name = vim_strnsave(arg, p - arg); if (group_name == NULL) // out of memory return AUGROUP_ERROR; group = au_find_group(group_name); |