svn commit: r314189 - head/lib/libcam

Ian Lepore ian at freebsd.org
Fri Feb 24 21:54:44 UTC 2017


On Fri, 2017-02-24 at 13:28 -0800, Ngie Cooper (yaneurabeya) wrote:
> > 
> > On Feb 24, 2017, at 13:17, Ian Lepore <ian at 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


More information about the svn-src-all mailing list