Re: [PATCH v3 2/2] xgethostname: handle long hostnames
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 19, 2017, 02:48 UTC
- Message-ID
- <xmqq8tmxcdt3.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20170418215743.18406-3-dturner@twosigma.com>
David Turner <dturner@twosigma.com> writes:
> If the full hostname doesn't fit in the buffer supplied to > gethostname, POSIX does not specify whether the buffer will be > null-terminated, so to be safe, we should do it ourselves. Introduce
The name of the character whose ASCII value is '\0' is NUL, not null (similarly for in-code comment).