Restore part of my fix spammed in v1.23:
fseeko(file_size, SEEK_SET) -> fseek(0L, SEEK_END) 1) File may grows between operations, so fseeko to file_size may miss 2) 0L, SEEK_END is the same code using in tail in all other places
This commit is contained in:
parent
1649c0b338
commit
462da59fb1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74885
@ -302,7 +302,7 @@ rlines(fp, off, sbp)
|
||||
}
|
||||
|
||||
/* Set the file pointer to reflect the length displayed. */
|
||||
if (fseeko(fp, sbp->st_size, SEEK_SET) == -1) {
|
||||
if (fseek(fp, 0L, SEEK_END) == -1) {
|
||||
ierr();
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user