summaryrefslogtreecommitdiffstats
path: root/text-utils/tailf.c
diff options
context:
space:
mode:
Diffstat (limited to 'text-utils/tailf.c')
-rw-r--r--text-utils/tailf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index 34d0cd53b..c111d02c0 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -74,11 +74,9 @@ static void tailf(const char *filename, size_t lines, struct stat *st)
if (data[i] == '\n')
lines++;
while (i) {
- if (data[i] == '\n') {
- if (--lines == 0) {
- i++;
- break;
- }
+ if (data[i] == '\n' && --lines == 0) {
+ i++;
+ break;
}
i--;
}