mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 02:06:37 +00:00
crontab: ftruncate() with ftello() instead of ftell().
Obtained from: OpenBSD (CVS rev. 1.47)
This commit is contained in:
parent
b83c6ff578
commit
e78e0c43ba
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295672
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue