From: Junio C Hamano Date: Wed, 13 Dec 2023 15:17:00 GMT Subject: Re: [PATCH] Use ^=1 to toggle between 0 and 1 Message-ID: In-Reply-To: <20231213080143.GA1684525@coredump.intra.peff.net> Jeff King writes: > Without digging into the code, I had just assumed that flipped_block was > used as an array index. But it really is a boolean, so I actually think > "flipped_block = !flipped_block" would probably be the most clear (but > IMHO not really worth the churn). ;-) > I don't even know that we'd need much of a weather-balloon patch. I > think it would be valid to do: > > #ifndef bool > #define bool int > > to handle pre-C99 compilers (if there even are any these days). Of > course we probably need some conditional magic to try to "#include > " for the actual C99. I guess we could assume C99 by default > and then add NO_STDBOOL as an escape hatch if anybody complains. Sounds good.