summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tail')
-rw-r--r--usr.bin/tail/forward.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c
index 13f9d79..0d9ff8d 100644
--- a/usr.bin/tail/forward.c
+++ b/usr.bin/tail/forward.c
@@ -246,13 +246,13 @@ rlines(fp, off, sbp)
static void
show(file_info_t *file)
{
- int ch, first;
+ int ch;
+ static file_info_t *last;
- first = 1;
while ((ch = getc(file->fp)) != EOF) {
- if (first && no_files > 1) {
+ if (last != file && no_files > 1) {
(void)printf("\n==> %s <==\n", file->file_name);
- first = 0;
+ last = file;
}
if (putchar(ch) == EOF)
oerr();
OpenPOWER on IntegriCloud