Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 2016 21:19:40 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r295672 - head/usr.sbin/cron/crontab
Message-ID:  <201602162119.u1GLJe9i048020@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602162119.u1GLJe9i048020>