[hackers] [sbase] No need to check for stdin on fclose() || FRIGN
commit 352eedff58f61fb1b6984dc14dd694c94fca0eb9
Author: FRIGN <dev_AT_frign.de>
Date: Sat Feb 7 21:42:41 2015 +0100
No need to check for stdin on fclose()
as we are not trying to read from it afterwards.
diff --git a/cmp.c b/cmp.c
index b6ff20b..bca4c0f 100644
--- a/cmp.c
+++ b/cmp.c
_AT_@ -76,10 +76,8 @@ main(int argc, char *argv[])
same = 0;
}
}
-
- for (n = 1; n < 2; n++)
- if (fp[n] != stdin)
- fclose(fp[n]);
+ fclose(fp[0]);
+ fclose(fp[1]);
return same ? Same : Diff;
}
Received on Tue Mar 24 2015 - 23:53:34 CET
This archive was generated by hypermail 2.3.0
: Wed Mar 25 2015 - 00:08:01 CET