1
0
forked from aniani/vim

patch 8.2.0967: unnecessary type casts for vim_strnsave()

Problem:    Unnecessary type casts for vim_strnsave().
Solution:   Remove the type casts.
This commit is contained in:
Bram Moolenaar
2020-06-12 22:59:11 +02:00
parent 722e505d1a
commit 71ccd03ee8
31 changed files with 66 additions and 64 deletions

View File

@@ -2699,7 +2699,7 @@ def_function(exarg_T *eap, char_u *name_arg)
p = skip_type(ret_type);
if (p > ret_type)
{
ret_type = vim_strnsave(ret_type, (int)(p - ret_type));
ret_type = vim_strnsave(ret_type, p - ret_type);
p = skipwhite(p);
}
else
@@ -2972,12 +2972,12 @@ def_function(exarg_T *eap, char_u *name_arg)
// Ignore leading white space.
p = skipwhite(p + 4);
heredoc_trimmed = vim_strnsave(theline,
(int)(skipwhite(theline) - theline));
skipwhite(theline) - theline);
}
if (*p == NUL)
skip_until = vim_strsave((char_u *)".");
else
skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
skip_until = vim_strnsave(p, skiptowhite(p) - p);
do_concat = FALSE;
is_heredoc = TRUE;
}
@@ -3002,9 +3002,9 @@ def_function(exarg_T *eap, char_u *name_arg)
// Ignore leading white space.
p = skipwhite(p + 4);
heredoc_trimmed = vim_strnsave(theline,
(int)(skipwhite(theline) - theline));
skipwhite(theline) - theline);
}
skip_until = vim_strnsave(p, (int)(skiptowhite(p) - p));
skip_until = vim_strnsave(p, skiptowhite(p) - p);
do_concat = FALSE;
is_heredoc = TRUE;
}