Sure. On 30/05, Rob Landley wrote: > On 05/28/2017 06:08 PM, Ilya Kuzmich wrote: > > V2 is one line shorter. > > I already committed and pushed it, could you send me a second patch on > top of the first? > > Thanks, > > Rob
>From 1c43ce41cae8277b70aea15f1178d0c499646e96 Mon Sep 17 00:00:00 2001 From: Ilya Kuzmich <ilya.kuzm...@gmail.com> Date: Tue, 30 May 2017 23:32:24 +0300 Subject: [PATCH] head: shorten loop
Signed-off-by: Ilya Kuzmich <ilya.kuzm...@gmail.com> --- toys/posix/head.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/toys/posix/head.c b/toys/posix/head.c index 63eb85b..f5fd281 100644 --- a/toys/posix/head.c +++ b/toys/posix/head.c @@ -34,7 +34,7 @@ static void do_head(int fd, char *name) if ((toys.optc > 1 && !(toys.optflags & FLAG_q)) || toys.optflags & FLAG_v) { // Print an extra newline for all but the first file - if (TT.file_no) xprintf("\n"); + if (TT.file_no++) xprintf("\n"); xprintf("==> %s <==\n", name); xflush(); } @@ -48,8 +48,6 @@ static void do_head(int fd, char *name) xwrite(1, toybuf, i); } - - TT.file_no++; } void head_main(void) -- 2.7.4
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net