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

Pedro F. Giffuni pfg at FreeBSD.org
Tue Feb 16 21:19:41 UTC 2016


Author: pfg
Date: Tue Feb 16 21:19:39 2016
New Revision: 295672
URL: https://svnweb.freebsd.org/changeset/base/295672

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

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

Modified: head/usr.sbin/cron/crontab/crontab.c
==============================================================================
--- head/usr.sbin/cron/crontab/crontab.c	Tue Feb 16 20:59:49 2016	(r295671)
+++ head/usr.sbin/cron/crontab/crontab.c	Tue Feb 16 21:19:39 2016	(r295672)
@@ -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-all mailing list