From: Jeff King Date: Thu, 16 Feb 2017 16:44:00 GMT Subject: Re: Confusing git messages when disk is full. Message-ID: <20170216164359.k2ab7laqqvusfsm2@sigill.intra.peff.net> In-Reply-To: <87tw7uv439.fsf@linux-m68k.org> 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