Re: [PATCH 5/6] cat-file: add declaration of variable i inside its for loop
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jul 10, 2024, 10:16 UTC
- Message-ID
- <CAOLa=ZRH7=Uj77Wd4WQW=KR8ppKw6nXZRH7pNZpHBPz4HhX8MQ@mail.gmail.com>
- In-Reply-To
- <20240628190503.67389-6-eric.peijian@gmail.com>
Eric Ju <eric.peijian@gmail.com> writes:
Show 5 quoted lines
> Some code 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. >
If we're doing this anyways, we could replace the 'int' with 'size_t' too.
[snip]