Close the input FILE * in read_file() and the output FILE *
in write_file() if read_stream() or write_stream() fails.
Details
Details
Test reads and writes of both plain files and to/from commands.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Looks good to me.
bin/ed/io.c | ||
---|---|---|
56 ↗ | (On Diff #16840) | We can get rid of the brackets since it's only one statement. (Same thing in write_file) |
bin/ed/io.c | ||
---|---|---|
56 ↗ | (On Diff #16840) | There was a recent style(9) discussion about this and style(9) was updated to permit this. The consensus was that using the brackets is preferred in new code because it is less error prone and there is less repo churn if another statement is added. However, doing a sweep to add brackets to existing code is not permitted. |
bin/ed/io.c | ||
---|---|---|
56 ↗ | (On Diff #16840) | I am aware of the style(9) discussion (I voted against it). |