refactor: fix PVS warnings (#23200)

This commit is contained in:
zeertzjq
2023-04-19 22:49:14 +08:00
committed by GitHub
parent 0ad5237162
commit ea52961c54
3 changed files with 3 additions and 6 deletions

View File

@@ -3484,7 +3484,7 @@ char *vim_gettempdir(void)
static int notfound = 0;
bool exists = false;
if (vim_tempdir == NULL || !(exists = os_isdir(vim_tempdir))) {
if (vim_tempdir != NULL && !exists) {
if (vim_tempdir != NULL) {
notfound++;
if (notfound == 1) {
ELOG("tempdir disappeared (antivirus or broken cleanup job?): %s", vim_tempdir);