mirror of
https://github.com/neovim/neovim.git
synced 2025-11-16 15:21:20 +00:00
refactor(memory): use builtin strcat() instead of STRCAT()
The latter was mostly relevant with the past char_u madness. NOTE: STRCAT also functioned as a counterfeit "NOLINT" for clint apparently. But NOLINT-ing every usecase is just the same as disabling the check entirely.
This commit is contained in:
@@ -265,7 +265,7 @@ static void set_ufunc_name(ufunc_T *fp, char *name)
|
||||
if ((uint8_t)name[0] == K_SPECIAL) {
|
||||
fp->uf_name_exp = xmalloc(strlen(name) + 3);
|
||||
STRCPY(fp->uf_name_exp, "<SNR>");
|
||||
STRCAT(fp->uf_name_exp, fp->uf_name + 3);
|
||||
strcat(fp->uf_name_exp, fp->uf_name + 3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2062,7 +2062,7 @@ char *get_scriptlocal_funcname(char *funcname)
|
||||
const int off = *funcname == 's' ? 2 : 5;
|
||||
char *newname = xmalloc(strlen(sid_buf) + strlen(funcname + off) + 1);
|
||||
STRCPY(newname, sid_buf);
|
||||
STRCAT(newname, funcname + off);
|
||||
strcat(newname, funcname + off);
|
||||
|
||||
return newname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user