I was looking at some example C++ code for a hardware interface I\'m working with and noticed a lot of statements along the following lines:
if ( NULL == pMsg )
It stops the single = assignment bug.
Eg,
if ( NULL = pMsg ) return rv;
won't compile, where as
if ( pMsg = NULL) return rv;
will compile and give you headaches