diff options
author | pfg <pfg@FreeBSD.org> | 2016-03-07 16:18:52 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-03-07 16:18:52 +0000 |
commit | 1c6432f96ad3b5045f960019fabb112e22a5aaec (patch) | |
tree | b15111fbfcb0f28221a58eb7f9f91e553a69f521 /usr.sbin/cron/crontab/crontab.c | |
parent | b970e684748c7880e31c9be00af5f3a692234394 (diff) | |
download | FreeBSD-src-1c6432f96ad3b5045f960019fabb112e22a5aaec.zip FreeBSD-src-1c6432f96ad3b5045f960019fabb112e22a5aaec.tar.gz |
MFC r295672:
crontab: ftruncate() with ftello() instead of ftell().
Obtained from: OpenBSD (CVS rev. 1.47)
Diffstat (limited to 'usr.sbin/cron/crontab/crontab.c')
-rw-r--r-- | usr.sbin/cron/crontab/crontab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c index f2e97a7..2608be7 100644 --- a/usr.sbin/cron/crontab/crontab.c +++ b/usr.sbin/cron/crontab/crontab.c @@ -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)) { |