summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/cron/cron/do_command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/cron/cron/do_command.c b/usr.sbin/cron/cron/do_command.c
index f5ab5b5..daf695f 100644
--- a/usr.sbin/cron/cron/do_command.c
+++ b/usr.sbin/cron/cron/do_command.c
@@ -468,13 +468,15 @@ child_process(e, u)
else
mailto = usernm;
}
+ if (mailto && *mailto == '\0')
+ mailto = NULL;
/* if we are supposed to be mailing, MAILTO will
* be non-NULL. only in this case should we set
* up the mail command and subjects and stuff...
*/
- if (mailto && *mailto != '\0') {
+ if (mailto) {
register char **env;
auto char mailcmd[MAX_COMMAND];
auto char hostname[MAXHOSTNAMELEN];
OpenPOWER on IntegriCloud