lkml.org 
[lkml]   [2014]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/1 net-next] af_unix: remove NULL assignment on static
From
Date
On Di, 2014-10-07 at 16:18 -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?

No, the standard requests implementations to implement false as 0 and
true as 1.

In case of assignments e.g. INT_MAX to _Bool (=bool) it will implicitly
converted to 1, so one can omit the often used !! with booleans.

Bye,
Hannes





\
 
 \ /
  Last update: 2014-10-07 23:01    [W:0.050 / U:1.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site