Messages in this thread | | | Date | Wed, 26 May 2004 13:34:38 -0700 | From | Paul Jackson <> | Subject | Re: [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/
| |