bug-gnulib
[Top][All Lists]
Advanced

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

Re: failure to build due to ignoring fwrite() result


From: Eric Blake
Subject: Re: failure to build due to ignoring fwrite() result
Date: Mon, 30 Aug 2010 14:06:17 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100806 Fedora/3.1.2-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.2

On 08/30/2010 01:59 PM, Jim Meyering wrote:
As I said, checking ferror() at the end of a write-to-log session then
triggering an event.  "good enough" even if not excruciatingly perfect.

Checking ferror is good enough as long as you rely only on fwrite, and
not say, *printf.  Some *printf failures are specified as not detectable
via ferror (but of course, the standard does not say that outright).

But that's why we have xfprintf - for those cases where you can have failure without having ferror() set.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]