From owner-svn-src-head@freebsd.org Tue Feb 13 19:52:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97943F1EF21; Tue, 13 Feb 2018 19:52:14 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [199.48.133.146]) by mx1.freebsd.org (Postfix) with ESMTP id 47C6E6D3D5; Tue, 13 Feb 2018 19:52:13 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 0E1965646B; Tue, 13 Feb 2018 13:52:12 -0600 (CST) Subject: Re: svn commit: r329237 - head/sys/libkern To: Ed Maste , Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201802131917.w1DJHmso047463@repo.freebsd.org> <1518549829.85310.39.camel@freebsd.org> From: Eric van Gyzen Message-ID: <1b3a489d-d62c-6f88-a269-a35ad9bf5ef5@vangyzen.net> Date: Tue, 13 Feb 2018 13:52:11 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Feb 2018 19:52:14 -0000 On 02/13/2018 13:43, Ed Maste wrote: > On 13 February 2018 at 14:23, Ian Lepore wrote: >> On Tue, 2018-02-13 at 19:17 +0000, Ed Maste wrote: >>> Author: emaste >>> Date: Tue Feb 13 19:17:48 2018 >>> New Revision: 329237 >>> URL: https://svnweb.freebsd.org/changeset/base/329237 >>> >>> Log: >>> libkern: use nul for terminating char rather than 0 >>> >>> Akin to the change made in r188080 for lib/libc/string/. >>> >>> Reported by: bde >>> Sponsored by: The FreeBSD Foundation >> >> 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 > sys/libkern, which is what Bruce commented on some time ago. I don't > have a personal preference for 0 or '\0' but definitely believe that > if we have multiple, similar copies of a function they ought to avoid > gratuitous differences. (I'm happy to change both trees to 0 if that's > preferred.) 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. Eric