less: code shrink
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 8 Jan 2018 09:27:23 +0000 (10:27 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 8 Jan 2018 09:27:23 +0000 (10:27 +0100)
function                                             old     new   delta
less_main                                           2471    2464      -7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/less.c

index 82092f600b12a44853d5e51bbb403a5fbc508991..d60e6d920b3163c881de971f204a207ea50bf9ee 100644 (file)
@@ -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