lkml.org 
[lkml]   [2012]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3] char/tpm: Use true and false for bools
Date
Am Donnerstag, 29. November 2012, 23:08:11 schrieb Kent Yoder:
> On Thu, Nov 29, 2012 at 01:54:52PM -0800, Joe Perches wrote:
> > >
> > > - itpm = (probe == 0) ? 0 : 1;
> > > + itpm = !!probe;
> >
> > Even more trivia:
> >
> > This !! isn't necessary as ints assigned to bool are converted
> > by the compiler to 0 or 1.
>
> Good to know, thanks Joe!

So v2 is fine.

Peter


\
 
 \ /
  Last update: 2012-11-29 23:41    [W:0.079 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site