scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 8f6aa9b855d6f3b4251141a82a06227381a8ac2f
parent 4bf6b4ce284606f33871caac9836f9a5a4b0a97f
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu, 16 Jun 2016 11:24:39 +0200

[driver] merge input check with other argument checks

Diffstat:
Mdriver/posix/scc.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -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);