Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Feb 2017 14:54:41 -0700
From:      Ian Lepore <ian@freebsd.org>
To:        "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com>
Cc:        Ngie Cooper <ngie@FreeBSD.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r314189 - head/lib/libcam
Message-ID:  <1487973281.25520.51.camel@freebsd.org>
In-Reply-To: <E74BCD6D-5291-49B2-99AE-B9B6AD634A3C@gmail.com>
References:  <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> <1487971068.25520.45.camel@freebsd.org> <E74BCD6D-5291-49B2-99AE-B9B6AD634A3C@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2017-02-24 at 13:28 -0800, Ngie Cooper (yaneurabeya) wrote:
> > 
> > On Feb 24, 2017, at 13:17, Ian Lepore <ian@freebsd.org> wrote:
> …
> 
> > 
> > Alright.  That answers everything except the actual important
> > question.
> >  So, again:
> > 
> > What *real* benefit does this churn bring?
> The benefits are: clarity in intent in the code and fixing dead
> (always false or always true) branches. The point you brought up is
> addressing the first goal.
> Thanks,
> -Ngie

What I'masking has nothing to do with dead branches.  So, no real
benefit then.  

I'm agnostic about using bare 0 versus '\0' in a context where the type
is char.  The type of '\0' in plain-C is exactly the same as the type
of a bare 0 -- both are just integer constants.

style(9) prefers the '\0' form, but style(9) also offers these words of
wisdom:

    Stylistic changes (including whitespace changes) are hard on the
    source repository and are to be avoided without good reason.

I sure hope we're not going to see a big round of 'svn blame'-ruining
commits just to change 0 to '\0' throughout the repo.

-- Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1487973281.25520.51.camel>