On Thu, Feb 16, 2017 at 11:10:18AM +0100, Andreas Schwab wrote:

> >>    int xfclose(FILE *fp)
> >>    {
> >>            return ferror(fp) | fclose(fp);
> >>    }
> >
> > Yes, that's exactly what I had in mind (might be worth calling out the
> > bitwise-OR, though, just to make it clear it's not a typo).
> 
> Since the order of evaluation is unspecified, it would be better to
> force sequencing ferror before fclose.

Good point. Arguably the call in tempfile.c is buggy.

-Peff

Reply via email to