Re: [PATCH v9 2/8] cat-file: add declaration of variable i inside its for loop
- From
Peijian Ju <eric.peijian@gmail.com>
- Date
- Jan 14, 2025, 01:36 UTC
- Message-ID
- <CAN2LT1B6xCvR2+Fkj3nvz28P1csAAw7Ukd1YMXw8tZZQO16UCQ@mail.gmail.com>
- In-Reply-To
- <CAP8UFD2uVD4S8pWpg-oOdhNi_0m0ZTGOvaJX8MpZGFU9yAbV7w@mail.gmail.com>
Thank you. Add that in the commit message.
On Fri, Jan 10, 2025 at 6:39 AM Christian Couder <christian.couder@gmail.com> wrote:
Show 10 quoted lines
> > On Wed, Jan 8, 2025 at 7:38 PM Eric Ju <eric.peijian@gmail.com> wrote: > > > > Some code used in this series declares variable i and only uses it > > in a for loop, not in any other logic outside the loop. > > > > Change the declaration of i to be inside the for loop for readability. > > It might be nice to say that, while at it, we also change the type > from "int" to "size_t" where the latter makes more sense.