[hackers] [sbase] Audit tr(1) || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 24 Mar 2015 23:54:18 +0100 (CET)

commit f6dc69eca3d75b9c37291e2e7201c2ab09e29be6
Author: FRIGN <dev_AT_frign.de>
Date: Tue Mar 17 23:41:22 2015 +0100

    Audit tr(1)
    
    A tool of my own devising, except from a small style-fix this code
    has already been triple-checked.

diff --git a/README b/README
index 7915370..e21dd35 100644
--- a/README
+++ b/README
_AT_@ -77,7 +77,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
 =*| test yes none
 =*| time yes none
 =*| touch yes none
-#* tr yes none
+#*| tr yes none
 =*| true yes none
 =*| tty yes none
 =*| uname yes none
diff --git a/tr.c b/tr.c
index 6ca1488..3d067bc 100644
--- a/tr.c
+++ b/tr.c
_AT_@ -192,7 +192,7 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND;
 
- if (argc < 1 || argc > 2 || (argc == 1 && dflag == sflag))
+ if (!argc || argc > 2 || (argc == 1 && dflag == sflag))
                 usage();
         set1ranges = makeset(argv[0], &set1, &set1check);
         if (argc == 2)
Received on Tue Mar 24 2015 - 23:54:18 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 25 2015 - 00:11:37 CET