Re: [PATCH v3] git: edit variable types to match what is assigned to them
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 16, 2022, 23:52 UTC
- Message-ID
- <xmqqmt7mkisx.fsf@gitster.g>
- In-Reply-To
- <pull.1399.v3.git.git.1671228557381.gitgitgadget@gmail.com>
"Rose via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Seija Kijin <doremylover123@gmail.com> > > There are many places where "int len = strlen(foo);" is written, > just for len to be passed as a parameter of size_t.
True.
Show 6 quoted lines
> This causes truncation and then expansion > back from int to size_t. > > Not to mention, this is poor logic, > and needless truncations can add > extra unneeded instructions.
I'd omit the last paragraph if I were writing it, as these two paragraphs saying exactly the same thing.