summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/crontab/crontab.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2016-03-07 16:18:52 +0000
committerpfg <pfg@FreeBSD.org>2016-03-07 16:18:52 +0000
commit1c6432f96ad3b5045f960019fabb112e22a5aaec (patch)
treeb15111fbfcb0f28221a58eb7f9f91e553a69f521 /usr.sbin/cron/crontab/crontab.c
parentb970e684748c7880e31c9be00af5f3a692234394 (diff)
downloadFreeBSD-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.c2
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)) {
OpenPOWER on IntegriCloud