[hackers] [scc] [driver] merge input check with other argument checks || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Jun 2016 21:45:13 +0200 (CEST)

commit 8f6aa9b855d6f3b4251141a82a06227381a8ac2f
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Jun 16 11:24:39 2016 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Jun 17 15:45:08 2016 +0200

    [driver] merge input check with other argument checks

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index 1b6cf5b..d3e6b9e 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
_AT_@ -446,12 +446,9 @@ main(int argc, char *argv[])
                 usage();
         } ARGEND
 
- if (Eflag && (Sflag || kflag) || argc > 1 && cflag && outfile)
+ if (Eflag && (Sflag || kflag) || argc > 1 && cflag && outfile || !argc)
                 usage();
 
- if (!argc)
- die("scc: fatal error: no input file");
-
         for (; *argv; ++argv)
                 build(*argv);
 
Received on Fri Jun 17 2016 - 21:45:13 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 17 2016 - 21:48:22 CEST