diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index 8e32cc45ab7..830d6aa20a7 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -136,7 +136,8 @@ forward(fp, style, off, sbp) return; } } else - bytes(fp, off); + if (bytes(fp, off)) + return; break; case RLINES: if (S_ISREG(sbp->st_mode)) @@ -154,7 +155,8 @@ forward(fp, style, off, sbp) return; } } else - lines(fp, off); + if (lines(fp, off)) + return; break; } diff --git a/usr.bin/tail/read.c b/usr.bin/tail/read.c index 94f3f0b515a..2b60918ae6f 100644 --- a/usr.bin/tail/read.c +++ b/usr.bin/tail/read.c @@ -113,6 +113,7 @@ bytes(fp, off) if (len = p - sp) WR(sp, len); } + return 0; } /* @@ -195,4 +196,5 @@ lines(fp, off) for (cnt = 0; cnt < recno; ++cnt) WR(lines[cnt].l, lines[cnt].len); } + return 0; }