summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/crontab
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
committerobrien <obrien@FreeBSD.org>2000-12-09 09:35:55 +0000
commitc2ee1dcc02035d781d6c70f06df7106979a9f870 (patch)
tree757810dc1fdd19be4c8125ccb9e8beb1aff3d929 /usr.sbin/cron/crontab
parentc174181f432119d1dae3f5e58ecc14c8d7b6f545 (diff)
downloadFreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.zip
FreeBSD-src-c2ee1dcc02035d781d6c70f06df7106979a9f870.tar.gz
Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
Diffstat (limited to 'usr.sbin/cron/crontab')
-rw-r--r--usr.sbin/cron/crontab/crontab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c
index 0071f6a..8ee2ccb 100644
--- a/usr.sbin/cron/crontab/crontab.c
+++ b/usr.sbin/cron/crontab/crontab.c
@@ -31,6 +31,7 @@ static const char rcsid[] =
#include "cron.h"
#include <errno.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/file.h>
#include <sys/stat.h>
#ifdef USE_UTIMES
@@ -297,8 +298,8 @@ edit_cmd() {
if (errno != ENOENT)
err(ERROR_EXIT, "%s", n);
warnx("no crontab for %s - using an empty one", User);
- if (!(f = fopen("/dev/null", "r")))
- err(ERROR_EXIT, "/dev/null");
+ if (!(f = fopen(_PATH_DEVNULL, "r")))
+ err(ERROR_EXIT, _PATH_DEVNULL);
}
um = umask(077);
OpenPOWER on IntegriCloud