svn commit: r185041 - head/usr.sbin/cron/crontab

Matteo Riondato matteo at FreeBSD.org
Mon Nov 17 16:39:51 PST 2008


Author: matteo
Date: Tue Nov 18 00:39:50 2008
New Revision: 185041
URL: http://svn.freebsd.org/changeset/base/185041

Log:
  Be more precise and use sizeof(tn)
  Pointed out by: glewis@
  
  MFC after:	3 days

Modified:
  head/usr.sbin/cron/crontab/crontab.c

Modified: head/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- head/usr.sbin/cron/crontab/crontab.c	Tue Nov 18 00:12:15 2008	(r185040)
+++ head/usr.sbin/cron/crontab/crontab.c	Tue Nov 18 00:39:50 2008	(r185041)
@@ -502,7 +502,7 @@ replace_cmd() {
 	}
 
 	(void) snprintf(n, sizeof(n), "tmp.%d", Pid);
-	(void) snprintf(tn, sizeof(n), CRON_TAB(n));
+	(void) snprintf(tn, sizeof(tn), CRON_TAB(n));
 
 	if (!(tmp = fopen(tn, "w+"))) {
 		warn("%s", tn);


More information about the svn-src-head mailing list