diff options
Diffstat (limited to 'miscutils/last.c')
-rw-r--r-- | miscutils/last.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/miscutils/last.c b/miscutils/last.c index f254118..a84e776 100644 --- a/miscutils/last.c +++ b/miscutils/last.c @@ -118,9 +118,10 @@ int last_main(int argc, char **argv ATTRIBUTE_UNUSED) printf("%-10s %-14s %-18s %-12.12s\n", ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4); next: - if (!pos) + pos -= sizeof(ut); + if (pos <= 0) break; /* done. */ - pos = lseek(file, pos - sizeof(ut), SEEK_SET); + xlseek(file, pos, SEEK_SET); } fflush_stdout_and_exit(EXIT_SUCCESS); |