Re: [PATCH v5 2/6] pack-bitmap-write.c: write lookup table extension

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 26, 2022 at 6:22 AM Taylor Blau <me@xxxxxxxxxxxx> 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 :)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux