diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-05-16 05:33:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-16 11:33:03 +0800 |
commit | d36dd2bae8e899b40cc21603e600a5046213bc36 (patch) | |
tree | ca7689e0415f3d0d8199eb89a9578a48e069981c /src/nvim/eval/userfunc.c | |
parent | 66b7f62542de0c9910f0e701a4c51834cfea3bab (diff) | |
download | rneovim-d36dd2bae8e899b40cc21603e600a5046213bc36.tar.gz rneovim-d36dd2bae8e899b40cc21603e600a5046213bc36.tar.bz2 rneovim-d36dd2bae8e899b40cc21603e600a5046213bc36.zip |
refactor: use xstrl{cpy,cat} on IObuff (#23648)
Replace usage of STR{CPY,CAT} with xstrl{cpy,cat} when using on IObuff
Co-authored-by: ii14 <ii14@users.noreply.github.com>
Diffstat (limited to 'src/nvim/eval/userfunc.c')
-rw-r--r-- | src/nvim/eval/userfunc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c index 7e20a298dd..a52b8d3f18 100644 --- a/src/nvim/eval/userfunc.c +++ b/src/nvim/eval/userfunc.c @@ -2892,9 +2892,9 @@ char *get_user_func_name(expand_T *xp, int idx) cat_func_name(IObuff, IOSIZE, fp); if (xp->xp_context != EXPAND_USER_FUNC) { - STRCAT(IObuff, "("); + xstrlcat(IObuff, "(", IOSIZE); if (!fp->uf_varargs && GA_EMPTY(&fp->uf_args)) { - STRCAT(IObuff, ")"); + xstrlcat(IObuff, ")", IOSIZE); } } return IObuff; @@ -3505,7 +3505,7 @@ char *get_return_cmd(void *rettv) s = ""; } - STRCPY(IObuff, ":return "); + xstrlcpy(IObuff, ":return ", IOSIZE); xstrlcpy(IObuff + 8, s, IOSIZE - 8); if (strlen(s) + 8 >= IOSIZE) { STRCPY(IObuff + IOSIZE - 4, "..."); |