Merge pull request #17567 from keszybz/various-small-cleanups

Various small cleanups
This commit is contained in:
Yu Watanabe
2020-11-12 16:30:06 +09:00
committed by GitHub
17 changed files with 114 additions and 133 deletions
+2 -3
View File
@@ -1418,9 +1418,8 @@ static int fixup_environment(void) {
return -errno;
/* The kernels sets HOME=/ for init. Let's undo this. */
if (path_equal_ptr(getenv("HOME"), "/") &&
unsetenv("HOME") < 0)
log_warning_errno(errno, "Failed to unset $HOME: %m");
if (path_equal_ptr(getenv("HOME"), "/"))
assert_se(unsetenv("HOME") == 0);
return 0;
}