Re: [PATCH v9 2/8] cat-file: add declaration of variable i inside its for loop
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jan 10, 2025, 11:39 UTC
- Message-ID
- <CAP8UFD2uVD4S8pWpg-oOdhNi_0m0ZTGOvaJX8MpZGFU9yAbV7w@mail.gmail.com>
- In-Reply-To
- <20250108183740.67022-3-eric.peijian@gmail.com>
On Wed, Jan 8, 2025 at 7:38 PM Eric Ju <eric.peijian@gmail.com> wrote:
Show 5 quoted lines
> > 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.