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)
3f9a1ff141
This commit is contained in:
Jan Edmund Lazo 2018-08-28 15:38:59 -04:00
parent 0a77dc7e05
commit 3dffc842fe

View File

@ -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 {