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

Re: [PATCH v2] xgethostname: handle long hostnames

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 19, 2017, 03:49 UTC
Message-ID
<xmqqk26hawg9.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<e1f3ca5df4484496a2e0ab601a940ecb@exmbdft7.ad.twosigma.com>
David Turner <David.Turner@twosigma.com> writes:
> If the writer has the smaller HOST_NAME_MAX, this will work fine.  If the reader
> has the smaller HOST_NAME_MAX, and the writer's actual value is too long,
> then there's no way the strcmp would succeed anyway.  So I don't think we need
> to worry about it.

Hmph, I have to agree with that reasoning, only because the value we read into locking_host[] is not used for error reporting at all. I would have insisted to read what is on the filesystem anyway if that were not the case.

Thanks.
Previous: David TurnerNext: Junio C Hamano
Message 8 of 9 in “xgethostname: handle long hostnames”
  1. xgethostname: handle long hostnamesDavid Turner, Apr 17, 2017
  2. Junio C HamanoApr 18, 2017
  3. Junio C HamanoApr 18, 2017
  4. René ScharfeApr 18, 2017
  5. Jeff KingApr 18, 2017
  6. Junio C HamanoApr 19, 2017
  7. David TurnerApr 18, 2017
  8. Junio C HamanoApr 19, 2017
  9. Junio C HamanoApr 19, 2017

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.