Merge pull request #16482 from poettering/coverity-246

two coverity fixes
This commit is contained in:
Yu Watanabe 2020-07-16 20:23:23 +09:00 committed by GitHub
commit 9e54462cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -2630,7 +2630,7 @@ static int apply_mount_namespace(
if (streq_ptr(runtime->var_tmp_dir, RUN_SYSTEMD_EMPTY))
var_tmp_dir = runtime->var_tmp_dir;
else if (runtime->tmp_dir)
else if (runtime->var_tmp_dir)
var_tmp_dir = strjoina(runtime->var_tmp_dir, "/tmp");
}

View file

@ -268,7 +268,7 @@ static int group_lookup_name(Manager *m, const char *name, gid_t *ret_gid) {
return -ENOMEM;
machine = hashmap_get(m->machines, mn);
if (!mn)
if (!machine)
return -ESRCH;
if (machine->class != MACHINE_CONTAINER)