diff options
author | Ihor Antonov <ngortheone@users.noreply.github.com> | 2019-07-28 15:28:53 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-07-28 21:28:53 +0200 |
commit | fe2ada737510b91655bda3aac4f6385de6410c0d (patch) | |
tree | ad033134b650efc32fadfaa4a41515baed98e6d4 /src | |
parent | 3b82c075b3adbe63fb2380bad875752fc950d352 (diff) | |
download | rneovim-fe2ada737510b91655bda3aac4f6385de6410c0d.tar.gz rneovim-fe2ada737510b91655bda3aac4f6385de6410c0d.tar.bz2 rneovim-fe2ada737510b91655bda3aac4f6385de6410c0d.zip |
PVS/V560: condition is always false #10638
* shorten_buf_name: condition inside outer if-branch with inverse condition
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/fileio.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index 387475c9e2..907e6c978a 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -4248,15 +4248,13 @@ void shorten_buf_fname(buf_T *buf, char_u *dirname, int force) buf->b_sfname = vim_strsave(p); buf->b_fname = buf->b_sfname; } - if (p == NULL || buf->b_fname == NULL) { + if (p == NULL) { buf->b_fname = buf->b_ffname; } } } -/* - * Shorten filenames for all buffers. - */ +/// Shorten filenames for all buffers. void shorten_fnames(int force) { char_u dirname[MAXPATHL]; @@ -4265,8 +4263,8 @@ void shorten_fnames(int force) FOR_ALL_BUFFERS(buf) { shorten_buf_fname(buf, dirname, force); - /* Always make the swap file name a full path, a "nofile" buffer may - * also have a swap file. */ + // Always make the swap file name a full path, a "nofile" buffer may + // also have a swap file. mf_fullname(buf->b_ml.ml_mfp); } status_redraw_all(); |