svn commit: r296464 - stable/9/usr.sbin/cron/crontab

Pedro F. Giffuni pfg at FreeBSD.org
Mon Mar 7 16:20:03 UTC 2016


Author: pfg
Date: Mon Mar  7 16:20:01 2016
New Revision: 296464
URL: https://svnweb.freebsd.org/changeset/base/296464

Log:
  MFC r295672:
  crontab: ftruncate() with ftello() instead of ftell().
  
  Obtained from:	OpenBSD (CVS rev. 1.47)

Modified:
  stable/9/usr.sbin/cron/crontab/crontab.c
Directory Properties:
  stable/9/usr.sbin/cron/crontab/   (props changed)

Modified: stable/9/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- stable/9/usr.sbin/cron/crontab/crontab.c	Mon Mar  7 16:18:52 2016	(r296463)
+++ stable/9/usr.sbin/cron/crontab/crontab.c	Mon Mar  7 16:20:01 2016	(r296464)
@@ -532,7 +532,7 @@ replace_cmd() {
 	Set_LineNum(1)
 	while (EOF != (ch = get_char(NewCrontab)))
 		putc(ch, tmp);
-	ftruncate(fileno(tmp), ftell(tmp));
+	ftruncate(fileno(tmp), ftello(tmp));
 	fflush(tmp);  rewind(tmp);
 
 	if (ferror(tmp)) {


More information about the svn-src-stable-9 mailing list