From: Hannes Frederic Sowa <hannes@stressinduktion.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: Guenter Roeck <linux@roeck-us.net>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1 net-next] af_unix: remove NULL assignment on static
Date: Tue, 07 Oct 2014 22:54:43 +0200 [thread overview]
Message-ID: <1412715283.11600.11.camel@localhost> (raw)
In-Reply-To: <1559212122.19553.1412714971908.open-xchange@webmail.nmp.skynet.be>
On Di, 2014-10-07 at 22:49 +0200, Fabian Frederick wrote:
>
> > On 07 October 2014 at 22:33 Guenter Roeck <linux@roeck-us.net> wrote:
> >
> >
> > On Tue, Oct 07, 2014 at 04:18:32PM -0400, David Miller wrote:
> > > From: Fabian Frederick <fabf@skynet.be>
> > > Date: Tue, 7 Oct 2014 22:16:36 +0200
> > >
> > > > static values are automatically initialized to NULL
> > > >
> > > > Signed-off-by: Fabian Frederick <fabf@skynet.be>
> > >
> > > Isn't there some implementation room given to compilers
> > > as to the representation of true and false?
> >
> > Not for true/false.
> >
> > C99 standard, section 7.16:
> >
> > ...
> > The remaining three macros are suitable for use in #if preprocessing
> > directives. They are
> >
> > true
> >
> > which expands to the integer constant 1,
> >
> > false
> >
> > which expands to the integer constant 0, and
> > ...
> >
> > No idea where the NULL comes into the picture, though.
> >
> > Guenter
>
> Maybe comment should have been "static values are automatically initialized to
> 0" then ?
I think David's concern was whether if 0 == false in all situations. It
is pretty clear that static memory is initialized to 0.
Thanks,
Hannes
next prev parent reply other threads:[~2014-10-07 20:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-07 20:16 [PATCH 1/1 net-next] af_unix: remove NULL assignment on static Fabian Frederick
2014-10-07 20:18 ` David Miller
2014-10-07 20:26 ` Hannes Frederic Sowa
2014-10-07 20:33 ` Guenter Roeck
2014-10-07 20:49 ` Fabian Frederick
2014-10-07 20:50 ` David Miller
2014-10-07 20:54 ` Hannes Frederic Sowa [this message]
2014-10-07 21:05 ` Fabian Frederick
2014-10-08 9:10 ` David Laight
2014-10-08 9:10 ` David Laight
2014-10-08 9:34 ` Hannes Frederic Sowa
2014-10-08 9:46 ` Michal Kubecek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1412715283.11600.11.camel@localhost \
--to=hannes@stressinduktion.org \
--cc=davem@davemloft.net \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.