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

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