From 462da59fb1bc14ede6603abf8bbf7c233d3ca11d Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Tue, 27 Mar 2001 23:24:25 +0000 Subject: [PATCH] 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 --- usr.bin/tail/forward.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index ffca06a93b1..f1f11184083 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -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; }