From: Abhradeep Chakraborty Date: Tue, 26 Jul 2022 18:22:54 GMT Subject: Re: [PATCH v5 2/6] pack-bitmap-write.c: write lookup table extension Message-ID: In-Reply-To: On Tue, Jul 26, 2022 at 6:22 AM Taylor Blau wrote: > I wonder if it would make this patch a little more readable to construct > and use the commit_positions array as a single preparatory step before > this commit. > > What do you think? Yeah, sure! I have no problem with that. > > + > > + ALLOC_ARRAY(commit_positions, writer.selected_nr); > > + for (uint32_t i = 0; i < writer.selected_nr; ++i) { > > Nit; we don't typically write for-loop expressions with variable > declarations inside of them. Make sure to declare i outside of the loop, > and then this becomes: > > for (i = 0; i < writer.selected_nr; i++) > > (also, we typically use the postfix ++ operator, that is "i++" instead > of "++i" unless there is a reason to prefer the latter over the former). Got it. Thanks :)