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 )
To stop you from writing:
if ( pMsg = NULL ) return rv;
by mistake. A good compiler will warn you about this however, so most people don't use the "constant first" way, as they find it difficult to read.