mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
PVS/V560: condition is always false #10638
* shorten_buf_name: condition inside outer if-branch with inverse condition
This commit is contained in:
parent
3b82c075b3
commit
fe2ada7375
@ -4248,15 +4248,13 @@ void shorten_buf_fname(buf_T *buf, char_u *dirname, int force)
|
|||||||
buf->b_sfname = vim_strsave(p);
|
buf->b_sfname = vim_strsave(p);
|
||||||
buf->b_fname = buf->b_sfname;
|
buf->b_fname = buf->b_sfname;
|
||||||
}
|
}
|
||||||
if (p == NULL || buf->b_fname == NULL) {
|
if (p == NULL) {
|
||||||
buf->b_fname = buf->b_ffname;
|
buf->b_fname = buf->b_ffname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/// Shorten filenames for all buffers.
|
||||||
* Shorten filenames for all buffers.
|
|
||||||
*/
|
|
||||||
void shorten_fnames(int force)
|
void shorten_fnames(int force)
|
||||||
{
|
{
|
||||||
char_u dirname[MAXPATHL];
|
char_u dirname[MAXPATHL];
|
||||||
@ -4265,8 +4263,8 @@ void shorten_fnames(int force)
|
|||||||
FOR_ALL_BUFFERS(buf) {
|
FOR_ALL_BUFFERS(buf) {
|
||||||
shorten_buf_fname(buf, dirname, force);
|
shorten_buf_fname(buf, dirname, force);
|
||||||
|
|
||||||
/* Always make the swap file name a full path, a "nofile" buffer may
|
// Always make the swap file name a full path, a "nofile" buffer may
|
||||||
* also have a swap file. */
|
// also have a swap file.
|
||||||
mf_fullname(buf->b_ml.ml_mfp);
|
mf_fullname(buf->b_ml.ml_mfp);
|
||||||
}
|
}
|
||||||
status_redraw_all();
|
status_redraw_all();
|
||||||
|
Loading…
Reference in New Issue
Block a user