diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-06-22 03:15:34 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-06-22 03:15:34 +0000 |
commit | 812e4a0e725b5e54bed5fd8f4fb84a50f7d297e6 (patch) | |
tree | 5b29659ad1da2f08faf22d78cc007eb7f6823fe6 /usr.sbin/cron/database.c | |
parent | 23f2f7013f3dee748995253841a77581c0454018 (diff) |
use snprintf(3) instead of home-grown glue_strings() function
millert@ ok
Diffstat (limited to 'usr.sbin/cron/database.c')
-rw-r--r-- | usr.sbin/cron/database.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/cron/database.c b/usr.sbin/cron/database.c index e2fe8f97bf3..c14132dfcf3 100644 --- a/usr.sbin/cron/database.c +++ b/usr.sbin/cron/database.c @@ -1,4 +1,4 @@ -/* $OpenBSD: database.c,v 1.15 2004/06/17 22:11:55 millert Exp $ */ +/* $OpenBSD: database.c,v 1.16 2004/06/22 03:15:33 avsm Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * All rights reserved @@ -22,7 +22,7 @@ */ #if !defined(lint) && !defined(LINT) -static char const rcsid[] = "$OpenBSD: database.c,v 1.15 2004/06/17 22:11:55 millert Exp $"; +static char const rcsid[] = "$OpenBSD: database.c,v 1.16 2004/06/22 03:15:33 avsm Exp $"; #endif /* vix 26jan87 [RCS has the log] @@ -109,8 +109,8 @@ load_database(cron_db *old_db) { if (strlcpy(fname, dp->d_name, sizeof fname) >= sizeof fname) continue; /* XXX log? */ - if (!glue_strings(tabname, sizeof tabname, SPOOL_DIR, - fname, '/')) + if (snprintf(tabname, sizeof tabname, "%s/%s", SPOOL_DIR, fname) >= + sizeof(tabname)) continue; /* XXX log? */ process_crontab(fname, fname, tabname, |