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)) {
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to