lkml.org 
[lkml]   [2004]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] NMI trigger switch support for debugging
Mikael Pettersson, replying to AKIYAMA Nobuyuki:
> > + if (!old_state == !unknown_nmi_panic)
> > + return 0;
>
> This conditional looks terribly obscure.

Would the following variant seem clearer:

if (!!unknown_nmi_panic == !!old_state)
return 0;

Odd, I know. For those of us familiar with the '!!' idiom, which
converts any value to its binary logical equivalent 0 (if zero) or
1 (otherwise), this reads as:

if (the logical value of unknown_nmi_panic is unchanged)
return 0;

However, I could easily imagine others finding this variant even
more bizarre.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@sgi.com> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.067 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site