aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-28 15:38:59 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-08-28 15:41:15 -0400
commit3dffc842fec3365d70192cc7c8162412d9187f9d (patch)
tree4d21dce35569e7f60f052ec95847d4179e2e0c31
parent0a77dc7e05cd794f03baaa79388b564b1a9cb703 (diff)
downloadrneovim-3dffc842fec3365d70192cc7c8162412d9187f9d.tar.gz
rneovim-3dffc842fec3365d70192cc7c8162412d9187f9d.tar.bz2
rneovim-3dffc842fec3365d70192cc7c8162412d9187f9d.zip
vim-patch:8.0.0983: unnecessary check for NULL pointer
Problem: Unnecessary check for NULL pointer. Solution: Remove the NULL check in dialog_changed(), it already happens in dialog_msg(). (Ken Takata) https://github.com/vim/vim/commit/3f9a1ff141412e9e85f7dff47d02946cb9be9228
-rw-r--r--src/nvim/ex_cmds2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index ab24b63110..c920264791 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -1285,9 +1285,8 @@ void dialog_changed(buf_T *buf, int checkall)
int ret;
exarg_T ea;
- dialog_msg(buff, _("Save changes to \"%s\"?"),
- (buf->b_fname != NULL) ?
- buf->b_fname : (char_u *)_("Untitled"));
+ assert(buf->b_fname != NULL);
+ dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname);
if (checkall) {
ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1);
} else {