lkml.org 
[lkml]   [2019]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Staging: rtlwifi: Remove unwanted parentheses
On Wed, Apr 03, 2019 at 07:18:03PM +0300, Dan Carpenter wrote:
> data_bit = (data & BIT(i)) ? 1 : 0;

I quite like the !! idiom also...

data_bit = !!(data & BIT(i));

regards,
dan carpenter

\
 
 \ /
  Last update: 2019-04-03 18:24    [W:0.036 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site