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

Re: [PATCH] strlcpy(): safer and faster version

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 17, 2021, 22:42 UTC
Message-ID
<xmqqa6gy3lc2.fsf@gitster.g>
In-Reply-To
<211217.86sfur9503.gmgdl@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> Thanks for saying everything I wanted to say ;-)
>
> Isn't strlcpy() an OpenBSD-initiated effort? So if we're going to update
Yes.
> this at all shouldn't be be aiming for picking an "upstream" here?
> E.g. [1]?

If this were an improvement, yes. But if I am reading the patch correctly, it changes what the value returned from the function means. I do not think that would fly even in the upstream, without a very good justification. Adding a new function that has semantics different from strlcpy() might be a possibility at upstream, but as far as this project is concerned, if we were to change the use of strlcpy() in the codebase, we often have tools that are much better suited in our arsenal, as Peff already mentioned, so...

Previous: Ævar Arnfjörð Bjarmason
Message 5 of 5 in “strlcpy(): safer and faster version”
  1. strlcpy(): safer and faster versionAndriy Makukha via GitGitGadget, Dec 16, 2021
  2. Jeff KingDec 16, 2021
  3. Junio C HamanoDec 16, 2021
  4. Ævar Arnfjörð BjarmasonDec 17, 2021
  5. Junio C HamanoDec 17, 2021

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.