diff options
author | Ihor Antonov <ngortheone@users.noreply.github.com> | 2019-07-28 18:11:54 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-07-29 00:11:54 +0200 |
commit | 00d915d02159037634f0f9628400648cc14da871 (patch) | |
tree | dfb8a24703219016fb6b8823708c6902a01bd635 /src/nvim/ex_cmds2.c | |
parent | f5b5f60b86c11d2f8bad6bd97c7129644171907c (diff) | |
download | rneovim-00d915d02159037634f0f9628400648cc14da871.tar.gz rneovim-00d915d02159037634f0f9628400648cc14da871.tar.bz2 rneovim-00d915d02159037634f0f9628400648cc14da871.zip |
PVS/V547: expression is always true/false #10640
Functions marked with FUNC_ATTR_NONNULL_RET do not return NULL.
Remove redundant checks.
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index cd0b05c6c9..73e6f85627 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -1793,17 +1793,14 @@ void ex_args(exarg_T *eap) // ":args": list arguments. if (ARGCOUNT > 0) { char_u **items = xmalloc(sizeof(char_u *) * (size_t)ARGCOUNT); - - if (items != NULL) { - // Overwrite the command, for a short list there is no scrolling - // required and no wait_return(). - gotocmdline(true); - for (int i = 0; i < ARGCOUNT; i++) { - items[i] = alist_name(&ARGLIST[i]); - } - list_in_columns(items, ARGCOUNT, curwin->w_arg_idx); - xfree(items); + // Overwrite the command, for a short list there is no scrolling + // required and no wait_return(). + gotocmdline(true); + for (int i = 0; i < ARGCOUNT; i++) { + items[i] = alist_name(&ARGLIST[i]); } + list_in_columns(items, ARGCOUNT, curwin->w_arg_idx); + xfree(items); } } else if (eap->cmdidx == CMD_arglocal) { garray_T *gap = &curwin->w_alist->al_ga; |