Apply segfault on no-args fix from robotti@metconnect.com
authorEric Andersen <andersen@codepoet.org>
Tue, 5 Sep 2000 18:21:53 +0000 (18:21 -0000)
committerEric Andersen <andersen@codepoet.org>
Tue, 5 Sep 2000 18:21:53 +0000 (18:21 -0000)
miscutils/mt.c
mt.c

index 087819e72af6f0e859151e17b146cb80fbaa5d30..e77f58a6ab852ba58a5b8376dc7b77d928399f5f 100644 (file)
@@ -55,7 +55,7 @@ extern int mt_main(int argc, char **argv)
        struct mtop op;
        int fd;
        
-       if ((argc != 2 && argc != 3) && **(argv + 1) != '-') {
+       if (argc < 2) {
                usage(mt_usage);
        }
 
diff --git a/mt.c b/mt.c
index 087819e72af6f0e859151e17b146cb80fbaa5d30..e77f58a6ab852ba58a5b8376dc7b77d928399f5f 100644 (file)
--- a/mt.c
+++ b/mt.c
@@ -55,7 +55,7 @@ extern int mt_main(int argc, char **argv)
        struct mtop op;
        int fd;
        
-       if ((argc != 2 && argc != 3) && **(argv + 1) != '-') {
+       if (argc < 2) {
                usage(mt_usage);
        }