To: vim_dev@googlegroups.com Subject: Patch 8.0.0983 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.0.0983 Problem: Unnecessary check for NULL pointer. Solution: Remove the NULL check in dialog_changed(), it already happens in dialog_msg(). (Ken Takata) Files: src/ex_cmds2.c *** ../vim-8.0.0982/src/ex_cmds2.c 2017-08-17 16:55:08.633414785 +0200 --- src/ex_cmds2.c 2017-08-21 22:03:16.225683455 +0200 *************** *** 1981,1989 **** buf_T *buf2; exarg_T ea; ! dialog_msg(buff, _("Save changes to \"%s\"?"), ! (buf->b_fname != NULL) ? ! buf->b_fname : (char_u *)_("Untitled")); if (checkall) ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1); else --- 1981,1987 ---- buf_T *buf2; exarg_T ea; ! dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname); if (checkall) ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1); else *** ../vim-8.0.0982/src/version.c 2017-08-21 22:01:23.174402425 +0200 --- src/version.c 2017-08-21 22:04:39.769152555 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 983, /**/ -- For society, it's probably a good thing that engineers value function over appearance. For example, you wouldn't want engineers to build nuclear power plants that only _look_ like they would keep all the radiation inside. (Scott Adams - The Dilbert principle) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///