Mercurial > vim
comparison src/ex_cmds2.c @ 12206:bd8d767fb36f v8.0.0983
patch 8.0.0983: unnecessary check for NULL pointer
commit https://github.com/vim/vim/commit/3f9a1ff141412e9e85f7dff47d02946cb9be9228
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Aug 21 22:06:02 2017 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 21 Aug 2017 22:15:06 +0200 |
parents | 59c1e09cf1a9 |
children | d0b039e2ed56 |
comparison
equal
deleted
inserted
replaced
12205:85c43ec066d8 | 12206:bd8d767fb36f |
---|---|
1979 char_u buff[DIALOG_MSG_SIZE]; | 1979 char_u buff[DIALOG_MSG_SIZE]; |
1980 int ret; | 1980 int ret; |
1981 buf_T *buf2; | 1981 buf_T *buf2; |
1982 exarg_T ea; | 1982 exarg_T ea; |
1983 | 1983 |
1984 dialog_msg(buff, _("Save changes to \"%s\"?"), | 1984 dialog_msg(buff, _("Save changes to \"%s\"?"), buf->b_fname); |
1985 (buf->b_fname != NULL) ? | |
1986 buf->b_fname : (char_u *)_("Untitled")); | |
1987 if (checkall) | 1985 if (checkall) |
1988 ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1); | 1986 ret = vim_dialog_yesnoallcancel(VIM_QUESTION, NULL, buff, 1); |
1989 else | 1987 else |
1990 ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1); | 1988 ret = vim_dialog_yesnocancel(VIM_QUESTION, NULL, buff, 1); |
1991 | 1989 |