summaryrefslogtreecommitdiffhomepage
path: root/miscutils/less.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-01-08 10:27:23 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-01-08 10:27:23 +0100
commit83c99ab4469e0f8a9a0e84ec506a8bc101cdcb91 (patch)
treef7c92f0833a62c9cd269e44cc034f55f45e8294d /miscutils/less.c
parent562f63e9a4583c887012dff782924110b1d1fd6b (diff)
less: code shrink
function old new delta less_main 2471 2464 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 82092f600..d60e6d920 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -255,7 +255,6 @@ struct globals {
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
less_gets_pos = -1; \
empty_line_marker = "~"; \
- num_files = 1; \
current_file = 1; \
eof_error = 1; \
terminated = 1; \
@@ -1773,9 +1772,8 @@ int less_main(int argc, char **argv)
* (used by some setups for manpage display)
*/
getopt32(argv, "EMmN~I" IF_FEATURE_LESS_TRUNCATE("S") /*ignored:*/"s");
- argc -= optind;
argv += optind;
- num_files = argc;
+ num_files = argc - optind;
files = argv;
/* Another popular pager, most, detects when stdout