0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

patch 8.2.0928: many type casts are used for vim_strnsave()

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.
This commit is contained in:
Bram Moolenaar
2020-06-07 20:49:05 +02:00
parent da84ac2a6f
commit df44a27b53
13 changed files with 22 additions and 20 deletions

View File

@@ -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);