crontab: ftruncate() with ftello() instead of ftell().

Obtained from:	OpenBSD (CVS rev. 1.47)
This commit is contained in:
Pedro F. Giffuni 2016-02-16 21:19:39 +00:00
parent b83c6ff578
commit e78e0c43ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295672

View file

@ -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)) {