summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/database.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-01-14 17:30:54 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-01-14 17:30:54 +0000
commit6e99aa99d2fd220f403c146652f72e3dba37b17c (patch)
tree8c0273bd890e7cd98442b79fb70dc6bf75a5ed11 /usr.sbin/cron/database.c
parentefed2175850caf17558cbc375a79acbad8f3820b (diff)
Replace MAXHOSTNAMELEN with HOST_NAME_MAX+1 and MAXNAMLEN with NAME_MAX
and use limits.h instead of sys/param.h.
Diffstat (limited to 'usr.sbin/cron/database.c')
-rw-r--r--usr.sbin/cron/database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/cron/database.c b/usr.sbin/cron/database.c
index 2d98f0db294..ff1c5806533 100644
--- a/usr.sbin/cron/database.c
+++ b/usr.sbin/cron/database.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: database.c,v 1.20 2015/01/14 17:27:29 millert Exp $ */
+/* $OpenBSD: database.c,v 1.21 2015/01/14 17:30:53 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* All rights reserved
@@ -92,7 +92,7 @@ load_database(cron_db *old_db) {
}
while (NULL != (dp = readdir(dir))) {
- char fname[MAXNAMLEN+1], tabname[MAXNAMLEN];
+ char fname[NAME_MAX+1], tabname[MAX_FNAME];
/* avoid file names beginning with ".". this is good
* because we would otherwise waste two guaranteed calls