commit e2d1f60bd74b551c254b9241702738037a78ccc1
parent bd026f28239671fba0e68d5169cc974f14505f6f
Author: Quentin Rameau <quinq@fifth.space>
Date: Tue, 7 Jun 2016 15:32:47 +0200
[cc2] join two if statements into one in main
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git 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();