projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Insert types for args of some function pointers to improve type checking.
[mmh]
/
uip
/
msgchk.c
diff --git
a/uip/msgchk.c
b/uip/msgchk.c
index
69999f6
..
1a59a3b
100644
(file)
--- a/
uip/msgchk.c
+++ b/
uip/msgchk.c
@@
-307,13
+307,12
@@
main (int argc, char **argv)
if (vecp == 0) {
char *home;
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");
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 {
}
status = checkmail (user, home, datesw, notifysw, 1);
} else {
@@
-328,7
+327,8
@@
main (int argc, char **argv)
} /* host == NULL */
#endif
} /* host == NULL */
#endif
- return done (status);
+ done (status);
+ return 1;
}
}