From edba90934de9277103a87947d7c25d33dbc13189 Mon Sep 17 00:00:00 2001 From: FRIGN Date: Fri, 6 Mar 2015 00:32:22 +0100 Subject: [PATCH] Small fix in head.c Only deal with this newline-handling when many is true. --- head.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/head.c b/head.c index 89493fd..6c1d937 100644 --- a/head.c +++ b/head.c @@ -55,10 +55,11 @@ main(int argc, char *argv[]) ret = 1; continue; } - if (newline) - putchar('\n'); - if (many) + if (many) { + if (newline) + putchar('\n'); printf("==> %s <==\n", *argv); + } newline = 1; head(fp, *argv, n); fclose(fp);