diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2019-01-05 00:33:26 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2019-01-05 00:33:26 +0100 |
| commit | 3e558468cf8815af7baa80b9ccd99753cd1be00d (patch) | |
| tree | 6d231482cb34bebb6c4c992074360c9aa67d09ae | |
| parent | 38b4ca26b555e5bdca4d672917a85f1bd60297c2 (diff) | |
| download | rneovim-3e558468cf8815af7baa80b9ccd99753cd1be00d.tar.gz rneovim-3e558468cf8815af7baa80b9ccd99753cd1be00d.tar.bz2 rneovim-3e558468cf8815af7baa80b9ccd99753cd1be00d.zip | |
PVS/V547: indent.c: xmalloc() never returns NULL
| -rw-r--r-- | src/nvim/indent.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/indent.c b/src/nvim/indent.c index 0b7ebd498a..7c3f354c13 100644 --- a/src/nvim/indent.c +++ b/src/nvim/indent.c @@ -544,10 +544,8 @@ int get_expr_indent(void) // Need to make a copy, the 'indentexpr' option could be changed while // evaluating it. char_u *inde_copy = vim_strsave(curbuf->b_p_inde); - if (inde_copy != NULL) { - indent = (int)eval_to_number(inde_copy); - xfree(inde_copy); - } + indent = (int)eval_to_number(inde_copy); + xfree(inde_copy); if (use_sandbox) { sandbox--; |