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

Reply via email to