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 )
So that you don't mix comparison (==) with assignment (=).
As you know, you can't assign to a constant. If you try, the compliler will give you an error.
Basically, it's one of defensive programming techniques. To protect yourself from yourself.