summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tail/forward.c6
-rw-r--r--usr.bin/tail/read.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c
index 8e32cc4..830d6aa 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 94f3f0b..2b60918 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;
}
OpenPOWER on IntegriCloud