From: Jeff King Date: Tue, 11 Jul 2017 07:41:43 GMT Subject: Re: [PATCH] use DIV_ROUND_UP Message-ID: <20170711074143.fxedaod3bmsxck2o@sigill.intra.peff.net> In-Reply-To: <3f643932-0fe1-26b0-d2bf-a2124a74deca@web.de> On Mon, Jul 10, 2017 at 07:08:38PM +0200, René Scharfe wrote: > > So I think it's a true mechanical conversion, but I have to admit the > > original is confusing. Without digging I suspect it's correct, though, > > just because a simple bug here would mean that our ewah bitmaps totally > > don't work. So it's probably not worth spending time on. > > A few lines below there is "self->bit_size = i + 1", so the code > calculates how many words the old and the new value are apart (or by how > many words the bitmap needs to be extended), which becomes easier to see > with the patch. Yeah, I'd agree the consistent use of "i + 1" makes the end result after your patch easier to read. -Peff