commit eee182cdd74a1348b9dfb8bce0016b32543f706a
Author: Hiltjo Posthuma <[email protected]>
Date: Tue Apr 1 16:55:37 2014 +0200
cmp: fix missing braces
just a style fix, this doesn't change any behaviour since fp[1] is set to
stdin above.
Signed-off-by: Hiltjo Posthuma <[email protected]>
diff --git a/cmp.c b/cmp.c
index e3ba852..c130429 100644
--- a/cmp.c
+++ b/cmp.c
@@ -42,10 +42,10 @@ main(int argc, char *argv[])
enprintf(Error, "fopen %s:", argv[0]);
fp[1] = stdin;
- if (argc == 2)
- fp[1] = fopen(argv[1], "r");
- if (!fp[1])
+ if (argc == 2) {
+ if(!(fp[1] = fopen(argv[1], "r")))
enprintf(Error, "fopen %s:", argv[1]);
+ }
for(n = 1; ; n++) {
b[0] = getc(fp[0]);