mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: fix PVS warnings (#23200)
This commit is contained in:
parent
0ad5237162
commit
ea52961c54
@ -3484,7 +3484,7 @@ char *vim_gettempdir(void)
|
|||||||
static int notfound = 0;
|
static int notfound = 0;
|
||||||
bool exists = false;
|
bool exists = false;
|
||||||
if (vim_tempdir == NULL || !(exists = os_isdir(vim_tempdir))) {
|
if (vim_tempdir == NULL || !(exists = os_isdir(vim_tempdir))) {
|
||||||
if (vim_tempdir != NULL && !exists) {
|
if (vim_tempdir != NULL) {
|
||||||
notfound++;
|
notfound++;
|
||||||
if (notfound == 1) {
|
if (notfound == 1) {
|
||||||
ELOG("tempdir disappeared (antivirus or broken cleanup job?): %s", vim_tempdir);
|
ELOG("tempdir disappeared (antivirus or broken cleanup job?): %s", vim_tempdir);
|
||||||
|
@ -1366,10 +1366,8 @@ int recover_names(char *fname, bool do_list, list_T *ret_list, int nr, char **fn
|
|||||||
} else if (ret_list != NULL) {
|
} else if (ret_list != NULL) {
|
||||||
for (int i = 0; i < num_files; i++) {
|
for (int i = 0; i < num_files; i++) {
|
||||||
char *name = concat_fnames(dir_name, files[i], true);
|
char *name = concat_fnames(dir_name, files[i], true);
|
||||||
if (name != NULL) {
|
|
||||||
tv_list_append_allocated_string(ret_list, name);
|
tv_list_append_allocated_string(ret_list, name);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
file_count += num_files;
|
file_count += num_files;
|
||||||
}
|
}
|
||||||
|
@ -3257,8 +3257,7 @@ static void showoptions(bool all, int opt_flags)
|
|||||||
} else {
|
} else {
|
||||||
varp = get_varp(p);
|
varp = get_varp(p);
|
||||||
}
|
}
|
||||||
if (varp != NULL
|
if (varp != NULL && (all || !optval_default(p, varp))) {
|
||||||
&& (all == 1 || (all == 0 && !optval_default(p, varp)))) {
|
|
||||||
int len;
|
int len;
|
||||||
if (opt_flags & OPT_ONECOLUMN) {
|
if (opt_flags & OPT_ONECOLUMN) {
|
||||||
len = Columns;
|
len = Columns;
|
||||||
|
Loading…
Reference in New Issue
Block a user