shithub: scc

Download patch

ref: 98ac3b3a041e1d980834ae6077fc51c191187de2
parent: fea3a7d917d4e0c2dafa31d954fac949572bff7e
author: Quentin Rameau <[email protected]>
date: Tue Jun 7 11:32:47 EDT 2016

[cc2] join two if statements into one in main

--- a/cc2/main.c
+++ b/cc2/main.c
@@ -39,10 +39,8 @@
 	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();