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

From: <git_AT_suckless.org>
Date: Thu, 19 Mar 2015 11:13:24 +0100 (CET)

commit c4f3b314427850d8d6f492c2486c651c651994d2
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 Thu Mar 19 2015 - 11:13:24 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 19 2015 - 11:24:33 CET