refactor: replace char_u with char 17 - remove STRLCPY (#21235)

refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
dundargoc
2023-01-09 14:13:06 +01:00
committed by GitHub
parent fc2cd28547
commit 1492094003
43 changed files with 230 additions and 233 deletions

View File

@@ -2440,7 +2440,7 @@ int op_change(oparg_T *oap)
long pre_indent = 0;
char_u *newp;
char *firstline;
char_u *ins_text;
char *ins_text;
char *oldp;
struct block_def bd;
@@ -2510,8 +2510,8 @@ int op_change(oparg_T *oap)
if (ins_len > 0) {
// Subsequent calls to ml_get() flush the firstline data - take a
// copy of the inserted text.
ins_text = (char_u *)xmalloc((size_t)(ins_len + 1));
STRLCPY(ins_text, firstline + bd.textcol, ins_len + 1);
ins_text = xmalloc((size_t)(ins_len + 1));
xstrlcpy(ins_text, firstline + bd.textcol, (size_t)ins_len + 1);
for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum;
linenr++) {
block_prep(oap, &bd, linenr, true);