Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/patch
On Mon, Aug 11, 2008 at 09:54:23PM +0100, David Laight wrote:
> Better is to to close the file with the sequence:
>
> fflush(outfile);
> err = ferror(outfile);
> fclose(outfile);
> if (err != 0)
> ...
The fflush() is redundant. fclose() fflushes the stream anyway. So you
should probably check:
if (fclose(outfile) == EOF)
warn("error closing outfile");
--chris
Home |
Main Index |
Thread Index |
Old Index