commit e2d1f60bd74b551c254b9241702738037a78ccc1
Author:     Quentin Rameau <quinq@fifth.space>
AuthorDate: Tue Jun 7 15:32:47 2016 +0200
Commit:     Quentin Rameau <quinq@fifth.space>
CommitDate: Tue Jun 7 15:32:47 2016 +0200

    [cc2] join two if statements into one in main

diff --git a/cc2/main.c b/cc2/main.c
index 75786ab..4850815 100644
--- a/cc2/main.c
+++ b/cc2/main.c
@@ -39,10 +39,8 @@ main(int argc, char *argv[])
        if (argc > 2)
                die("usage: cc2 [irfile]");
 
-       if (argv[1]) {
-               if (!freopen(argv[1], "r", stdin))
-                       die("cc2: cannot open %s", argv[1]);
-       }
+       if (argv[1] && !freopen(argv[1], "r", stdin))
+               die("cc2: cannot open %s", argv[1]);
 
        while (moreinput()) {
                parse();

Reply via email to