Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/external/bsd/bind/dist/lib/isc/include/isc

On Tue, Sep 13, 2011 at 03:07:44PM -0400, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date:         Tue Sep 13 19:07:44 UTC 2011
> Modified Files:
>       src/external/bsd/bind/dist/lib/isc/include/isc: util.h
> Log Message:
> Some versions of linux have probably marked fwrite(3) as
> __attribute__((__warn_unused_result__))

What sort of moonshine are those guys on?

Checking the result of fwrite() (and fprintf()) for error is often
pointless since the error doesn't happen until the data is written.
Unless the app always calls fflush() and ferror() before fclose()
checking the result from ferror/fprintf will only give a false
sense of security - and make the code unreadable.


David Laight:

Home | Main Index | Thread Index | Old Index