From 75fea678c039381b310d15a86d698cba7ec9805d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Fri, 28 Nov 2014 16:56:53 -0600 Subject: Tiny in-passing cleanups to more.c. --- toys/pending/more.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'toys/pending/more.c') diff --git a/toys/pending/more.c b/toys/pending/more.c index 9d89626a..eb48fa7b 100644 --- a/toys/pending/more.c +++ b/toys/pending/more.c @@ -17,7 +17,6 @@ config MORE #define FOR_more #include "toys.h" -#include GLOBALS( struct termios inf; @@ -52,7 +51,6 @@ void more_main() if (!isatty(STDOUT_FILENO) || !(cin = fopen("/dev/tty", "r"))) { loopfiles(toys.optargs, do_cat_operation); - toys.exitval = 0; return; } @@ -89,7 +87,7 @@ void more_main() if (st.st_size) more_msg_len += printf("(%d%% of %lld bytes)", (int) (100 * ( (double) ftell(fp) / (double) st.st_size)), - st.st_size); + (long long)st.st_size); fflush(NULL); while (1) { @@ -117,5 +115,6 @@ void more_main() stop: tcsetattr(TT.cin_fd, TCSANOW, &TT.inf); fclose(cin); + // Even if optarg not found, exit value still 0 toys.exitval = 0; } -- cgit v1.2.3