0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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

@@ -1846,7 +1846,7 @@ fill_submatch_list(int argc UNUSED, typval_T *argv, int argskip, int argcount)
if (s == NULL || rsm.sm_match->endp[i] == NULL)
s = NULL;
else
s = vim_strnsave(s, (int)(rsm.sm_match->endp[i] - s));
s = vim_strnsave(s, rsm.sm_match->endp[i] - s);
li->li_tv.v_type = VAR_STRING;
li->li_tv.vval.v_string = s;
li = li->li_next;
@@ -2462,7 +2462,7 @@ reg_submatch(int no)
if (s == NULL || rsm.sm_match->endp[no] == NULL)
retval = NULL;
else
retval = vim_strnsave(s, (int)(rsm.sm_match->endp[no] - s));
retval = vim_strnsave(s, rsm.sm_match->endp[no] - s);
}
return retval;