From 6ab83f35724737a7b74cfee0d21abe7c815f0a1a Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 15 May 2021 20:36:13 -0400 Subject: Add 'FUNC_ATTR_NONNULL_RET' to nonnull alloc funcs (#14559) --- src/nvim/eval/funcs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/nvim/eval/funcs.c') diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index c2e1639624..072d206ecb 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -2770,10 +2770,9 @@ static void f_get(typval_T *argvars, typval_T *rettv, FunPtr fptr) } } else if (strcmp(what, "args") == 0) { rettv->v_type = VAR_LIST; - if (tv_list_alloc_ret(rettv, pt->pt_argc) != NULL) { - for (int i = 0; i < pt->pt_argc; i++) { - tv_list_append_tv(rettv->vval.v_list, &pt->pt_argv[i]); - } + tv_list_alloc_ret(rettv, pt->pt_argc); + for (int i = 0; i < pt->pt_argc; i++) { + tv_list_append_tv(rettv->vval.v_list, &pt->pt_argv[i]); } } else { EMSG2(_(e_invarg2), what); -- cgit