[hackers] [sbase] tail: allow tail -n 0 or tail -0 || Hiltjo Posthuma
commit d6aff89bbb0ff229351ba76d85bd6728bc8f366b
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Mon Mar 30 21:24:46 2015 +0200
tail: allow tail -n 0 or tail -0
fix a crash, but allow this option.
diff --git a/tail.c b/tail.c
index 6d02914..888dd47 100644
--- a/tail.c
+++ b/tail.c
_AT_@ -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
index 3d067bc..5dcc307 100644
--- a/tr.c
+++ b/tr.c
_AT_@ -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)
{
Received on Wed Apr 01 2015 - 12:11:10 CEST
This archive was generated by hypermail 2.3.0
: Wed Apr 01 2015 - 12:12:16 CEST