X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/99e5043db7ee6cf80f93708610a6e584a8068c6a..1524cb8c0b86a854149d7859d6a2503d61dbaa36:/uip/msgchk.c diff --git a/uip/msgchk.c b/uip/msgchk.c index 69999f6d..872dc2e1 100644 --- a/uip/msgchk.c +++ b/uip/msgchk.c @@ -307,13 +307,12 @@ main (int argc, char **argv) if (vecp == 0) { char *home; - home = (uid = geteuid()) ? home = getenv ("HOME") : NULL; - if (home == NULL) { + /* Not sure this check makes sense... */ + if (!geteuid() || NULL == (home = getenv("HOME"))) { pw = getpwnam (user); if (pw == NULL) adios (NULL, "unable to get information about user"); - if (home == NULL) - home = pw->pw_dir; + home = pw->pw_dir; } status = checkmail (user, home, datesw, notifysw, 1); } else {