commit d6aff89bbb0ff229351ba76d85bd6728bc8f366b
parent d583d12300a8990715824857400aaa7f66699333
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 30 Mar 2015 21:24:46 +0200
tail: allow tail -n 0 or tail -0
fix a crash, but allow this option.
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/tail.c b/tail.c
@@ -106,6 +106,9 @@ main(int argc, char *argv[])
usage();
} ARGEND;
+ if (!num)
+ return 0;
+
if (!argc)
tail(stdin, "<stdin>");
else {
diff --git a/tr.c b/tr.c
@@ -39,7 +39,6 @@ static struct range *set2 = NULL;
static size_t set2ranges = 0;
static int (*set2check)(Rune) = NULL;
-
static size_t
rangelen(struct range r)
{