refactor: fix clang and PVS warnings (#19532)

This commit is contained in:
zeertzjq
2022-07-28 06:05:33 +08:00
committed by GitHub
parent 7d9e68669c
commit e0c433833f
9 changed files with 12 additions and 9 deletions

View File

@@ -310,7 +310,7 @@ static bool v_do_log_to_file(FILE *log_file, int log_level, const char *context,
const char *parent = path_tail(os_getenv(ENV_NVIM));
// Servername. Empty until starting=false.
const char *serv = path_tail(get_vim_var_str(VV_SEND_SERVER));
if (parent && parent[0] != NUL) {
if (parent[0] != NUL) {
snprintf(name, sizeof(name), "%s/c", parent); // "/c" indicates child.
} else if (serv[0] != NUL) {
snprintf(name, sizeof(name), "%s", serv);