git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Rose via GitGitGadgetNext: Rose via GitGitGadget
Message 5 of 20 in “git: edit variable types to match what is assigned to them”
  1. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 16, 2022
  2. Junio C HamanoDec 16, 2022
  3. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 16, 2022
  4. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 16, 2022
  5. Junio C HamanoDec 16, 2022
  6. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 21, 2022
  7. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  8. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  9. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  10. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  11. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  12. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 23, 2022
  13. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 29, 2022
  14. git: edit variable types to match what is assigned to themRose via GitGitGadget, Dec 29, 2022
  15. git: edit variable types to match what is assigned to themRose via GitGitGadget, Jan 3, 2023
  16. git: change variable types to match what is assigned to themRose via GitGitGadget, Jan 8, 2023
  17. git: change variable types to match what is assigned to themRose via GitGitGadget, Jan 8, 2023
  18. git: change variable types to match what is assigned to themRose via GitGitGadget, Mar 15, 2023
  19. git: change variable types to match what is assigned to themRose via GitGitGadget, Mar 15, 2023
  20. Junio C HamanoMar 15, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.