I'm wondering whether it's considered okay to do something like this.
if ( p_Pointer != NULL ) {
return p_Pointer;
} else {
return NULL;
}
Without the else, whatever. The point is that if the pointer is null, NULL is going to be returned, so it would seem pointless wasting a step on this. However, it seems useful for debugging purposes, because if I was stepping through with a debugger I would be able to check with this test if the pointer is NULL or not.
Any comments or suggestions regarding this practice?