From c1161cf09f5d9646b0e0c6ec504ed26a0623e691 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 29 Feb 2016 23:30:03 -0600 Subject: do_regular_file() prints output line, don't fall through to print default. --- toys/pending/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'toys/pending/file.c') diff --git a/toys/pending/file.c b/toys/pending/file.c index 49f987c6..e4820a3b 100644 --- a/toys/pending/file.c +++ b/toys/pending/file.c @@ -248,7 +248,10 @@ void file_main(void) if (fd!=-1) { if (sb.st_size == 0) what = "empty"; - else do_regular_file(fd, name); + else { + do_regular_file(fd, name); + continue; + } } if (fd>0) close(fd); } else if (S_ISBLK(sb.st_mode)) what = "block special"; -- cgit v1.2.3