From b853ef770a25fcd91def6c5016d65c336897c2cc Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 2 Feb 2025 08:23:48 +0800 Subject: vim-patch:9.1.1063: too many strlen() calls in userfunc.c Problem: too many strlen() calls in userfunc.c Solution: refactor userfunc.c and remove calls to strlen(), drop set_ufunc_name() and roll it into alloc_ufunc(), check for out-of-memory condition in trans_function_name_ext() (John Marriott) closes: vim/vim#16537 https://github.com/vim/vim/commit/b32800f7c51c866dc0e87244eb4902540982309d Add missing change to call_user_func() from patch 8.1.1007. Consistently use PRIdSCID instead of PRId64 for script IDs. Co-authored-by: John Marriott --- src/nvim/ex_docmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nvim/ex_docmd.c') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 137226e2ad..ceb17a995d 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -7400,8 +7400,7 @@ char *eval_vars(char *src, const char *srcstart, size_t *usedlen, linenr_T *lnum *errormsg = _(e_usingsid); return NULL; } - snprintf(strbuf, sizeof(strbuf), "%" PRIdSCID "_", - current_sctx.sc_sid); + snprintf(strbuf, sizeof(strbuf), "%" PRIdSCID "_", current_sctx.sc_sid); result = strbuf; break; -- cgit