X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmsgchk.c;h=e052b42eba96df6bef73bbc25ab0d0990ff59f15;hp=69999f6d62f4e7d7d30e63e811afb56061ed3064;hb=5dd6771b28c257af405d7248639ed0e3bcdce38b;hpb=99e5043db7ee6cf80f93708610a6e584a8068c6a diff --git a/uip/msgchk.c b/uip/msgchk.c index 69999f6..e052b42 100644 --- a/uip/msgchk.c +++ b/uip/msgchk.c @@ -2,8 +2,6 @@ /* * msgchk.c -- check for mail * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -307,13 +305,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 { @@ -328,7 +325,8 @@ main (int argc, char **argv) } /* host == NULL */ #endif - return done (status); + done (status); + return 1; }