On Tue, Feb 13, 2018 at 11:52 AM, Eric van Gyzen <e...@vangyzen.net> wrote:
> On 02/13/2018 13:43, Ed Maste wrote:
>> On 13 February 2018 at 14:23, Ian Lepore <i...@freebsd.org> wrote:
>>> There are many ways to spell 0. Why are we using something other than
>>> the simplest way? Is it a style rule thing, or is it portability-
>>> correctness, or what?
>> I made the change to improve consistency between lib/libc/string and
> I prefer '\0' here because it tells the reader that it's a NUL
> character, as opposed to a NULL pointer or a zero integer. Yes, the
> reader should already know that, but the author can /help/ the reader by
> communicating more clearly and completely.
And I prefer 0, because it's easier to type and conveys exactly the
same meaning. A character NUL is simply a zero integer of char type.
These are standard library string manipulation routines with char
pointer types. It is already extremely clear to the reader that the
zeros involved are end-of-string sentinels.
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"