aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/tail.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/tail.c')
-rw-r--r--toys/posix/tail.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/tail.c b/toys/posix/tail.c
index d1c62508..bf25a149 100644
--- a/toys/posix/tail.c
+++ b/toys/posix/tail.c
@@ -136,7 +136,7 @@ static void do_tail(int fd, char *name)
int linepop = 1;
if (toys.optflags & FLAG_f) {
- int f = TT.file_no*2;
+ int f = (TT.file_no++)*2;
char *s = name;
if (!fd) sprintf(s = toybuf, "/proc/self/fd/%d", fd);
@@ -146,7 +146,7 @@ static void do_tail(int fd, char *name)
}
if (toys.optc > 1) {
- if (TT.file_no++) xputc('\n');
+ if (TT.file_no) xputc('\n');
xprintf("==> %s <==\n", name);
}