No need to check for stdin on fclose()

as we are not trying to read from it afterwards.
This commit is contained in:
FRIGN 2015-02-07 21:42:41 +01:00
parent cb1b5d532b
commit 352eedff58
1 changed files with 2 additions and 4 deletions

6
cmp.c
View File

@ -76,10 +76,8 @@ main(int argc, char *argv[])
same = 0; same = 0;
} }
} }
fclose(fp[0]);
for (n = 1; n < 2; n++) fclose(fp[1]);
if (fp[n] != stdin)
fclose(fp[n]);
return same ? Same : Diff; return same ? Same : Diff;
} }