Re: [chrony-dev] GCC issue

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


You need the fprintf()<0 since fprintf almost always returns a non-zero
number. Only if it is negative is it an error.

I have no idea why the bitwise or would fail.


On Tue, 21 Jan 2014, Miroslav Lichvar wrote:

On Tue, Jan 21, 2014 at 11:25:09AM +0100, H�n Johansson wrote:
The second call to fclose should also be checked for errors.

Yes, that was the intent of the original commit which joined the two
calls with bitwise or. It seems a new varible is needed to do that
without breaking the sequence.

r = fprintf();
r |= fclose();
if (r) ...



--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/