James A. Morrison wrote:
On 11/17/05, Waldek Hebisch hebisch@math.uni.wroc.pl wrote:
--- gpc/p/lang.c.bb2 2005-11-18 03:45:51.039453752 +0100 +++ gpc/p/lang.c 2005-11-18 03:46:02.528707120 +0100 @@ -664,7 +664,6 @@ call_gpcpp (const char * filename, FILE if (!co->print_deps) gpcpp_writeout (gpcpp_out_fname, gpcpp_out_stream);
- fclose (gpcpp_out_stream);
Should the fclose be moved into the if stmt?
exit (EXIT_SUCCESS); }
Yes, the following is better:
--- gpc/p/lang.c.bb2 2005-11-18 03:45:51.000000000 +0100 +++ gpc/p/lang.c 2005-11-18 15:29:10.730506856 +0100 @@ -663,8 +663,9 @@ call_gpcpp (const char * filename, FILE fclose (fi); if (!co->print_deps) gpcpp_writeout (gpcpp_out_fname, gpcpp_out_stream); + else + fclose (gpcpp_out_stream);
- fclose (gpcpp_out_stream); exit (EXIT_SUCCESS); }