From 8c0e1236362c2999f7d836c4e4fbcc208bb0ba64 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 12 Jun 2018 22:19:41 +0000 Subject: [PATCH] slice: exit immediately if you will never output anything else --- slice.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slice.c b/slice.c index e326d06..6eb35d5 100644 --- a/slice.c +++ b/slice.c @@ -38,6 +38,9 @@ main(int argc, char *argv[]) drop = !drop; argn += 1; if (argn == argc) { + if (drop) { + break; + } next = ULONG_MAX; } else { next = strtoul(argv[argn], NULL, 0);