diff options
Diffstat (limited to 'calmwm.c')
-rw-r--r-- | calmwm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/calmwm.c b/calmwm.c index 03d594b..21e55bc 100644 --- a/calmwm.c +++ b/calmwm.c @@ -81,7 +81,8 @@ main(int argc, char **argv) if (signal(SIGCHLD, sighdlr) == SIG_ERR) err(1, "signal"); - if ((Conf.homedir = getenv("HOME")) == NULL || Conf.homedir[0] == '\0') { + Conf.homedir = getenv("HOME"); + if ((Conf.homedir == NULL) || (Conf.homedir[0] == '\0')) { pw = getpwuid(getuid()); if (pw != NULL && pw->pw_dir != NULL && *pw->pw_dir != '\0') Conf.homedir = pw->pw_dir; |