fix lint error

This commit is contained in:
ckelsel 2017-11-11 09:04:48 +08:00
parent 67a2207c4a
commit ea020f2e26

View File

@ -307,7 +307,7 @@ readfile (
int try_mac; int try_mac;
int try_dos; int try_dos;
int try_unix; int try_unix;
int file_rewind = FALSE; int file_rewind = false;
int can_retry; int can_retry;
linenr_T conv_error = 0; /* line nr with conversion error */ linenr_T conv_error = 0; /* line nr with conversion error */
linenr_T illegal_byte = 0; /* line nr with illegal byte */ linenr_T illegal_byte = 0; /* line nr with illegal byte */
@ -647,39 +647,38 @@ readfile (
int m = msg_scroll; int m = msg_scroll;
int n = msg_scrolled; int n = msg_scrolled;
/* // The file must be closed again, the autocommands may want to change
* The file must be closed again, the autocommands may want to change // the file before reading it.
* the file before reading it. if (!read_stdin) {
*/ close(fd); // ignore errors
if (!read_stdin) }
close(fd); /* ignore errors */
/* // The output from the autocommands should not overwrite anything and
* The output from the autocommands should not overwrite anything and // should not be overwritten: Set msg_scroll, restore its value if no
* should not be overwritten: Set msg_scroll, restore its value if no // output was done.
* output was done. msg_scroll = true;
*/ if (filtering) {
msg_scroll = TRUE;
if (filtering)
apply_autocmds_exarg(EVENT_FILTERREADPRE, NULL, sfname, apply_autocmds_exarg(EVENT_FILTERREADPRE, NULL, sfname,
FALSE, curbuf, eap); false, curbuf, eap);
else if (read_stdin) } else if (read_stdin) {
apply_autocmds_exarg(EVENT_STDINREADPRE, NULL, sfname, apply_autocmds_exarg(EVENT_STDINREADPRE, NULL, sfname,
FALSE, curbuf, eap); false, curbuf, eap);
else if (newfile) } else if (newfile) {
apply_autocmds_exarg(EVENT_BUFREADPRE, NULL, sfname, apply_autocmds_exarg(EVENT_BUFREADPRE, NULL, sfname,
FALSE, curbuf, eap); false, curbuf, eap);
else } else {
apply_autocmds_exarg(EVENT_FILEREADPRE, sfname, sfname, apply_autocmds_exarg(EVENT_FILEREADPRE, sfname, sfname,
FALSE, NULL, eap); false, NULL, eap);
}
// autocommands may have changed it // autocommands may have changed it
try_mac = (vim_strchr(p_ffs, 'm') != NULL); try_mac = (vim_strchr(p_ffs, 'm') != NULL);
try_dos = (vim_strchr(p_ffs, 'd') != NULL); try_dos = (vim_strchr(p_ffs, 'd') != NULL);
try_unix = (vim_strchr(p_ffs, 'x') != NULL); try_unix = (vim_strchr(p_ffs, 'x') != NULL);
if (msg_scrolled == n) if (msg_scrolled == n) {
msg_scroll = m; msg_scroll = m;
}
if (aborting()) { /* autocmds may abort script processing */ if (aborting()) { /* autocmds may abort script processing */
--no_wait_return; --no_wait_return;