Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Mar 2016 16:20:01 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r296464 - stable/9/usr.sbin/cron/crontab
Message-ID:  <201603071620.u27GK1BJ080068@repo.freebsd.org>

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



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