diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-24 02:49:59 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2021-09-24 02:49:59 -0700 |
commit | 3c7cef7b08c03b5bebc25d137425ef2cd6ff4472 (patch) | |
tree | c05157e9f009bca1269dbf46ea81b4b5c9562f24 /src | |
parent | fefd1652e7ffd1e756d2475f970ff2475cdb741f (diff) | |
download | rneovim-3c7cef7b08c03b5bebc25d137425ef2cd6ff4472.tar.gz rneovim-3c7cef7b08c03b5bebc25d137425ef2cd6ff4472.tar.bz2 rneovim-3c7cef7b08c03b5bebc25d137425ef2cd6ff4472.zip |
fix(PVS V681): function call order is undefined
https://pvs-studio.com/en/docs/warnings/v681/
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 2b5325a917..c58eb1610e 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3112,12 +3112,13 @@ void fileinfo(int fullname, // when non-zero print full path (size_t)(IOSIZE - (p - buffer)), true); } + bool dontwrite = bt_dontwrite(curbuf); vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s", curbufIsChanged() ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", - (curbuf->b_flags & BF_NOTEDITED) && !bt_dontwrite(curbuf) + (curbuf->b_flags & BF_NOTEDITED) && !dontwrite ? _("[Not edited]") : "", - (curbuf->b_flags & BF_NEW) && !bt_dontwrite(curbuf) + (curbuf->b_flags & BF_NEW) && !dontwrite ? new_file_message() : "", (curbuf->b_flags & BF_READERR) ? _("[Read errors]") : "", |