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 <hiltjo@codemadness.org>
This commit is contained in:
Hiltjo Posthuma 2014-04-01 16:55:37 +02:00 committed by sin
parent 6b45824463
commit eee182cdd7

6
cmp.c
View File

@ -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]);