I am wondering if something like this can be considered.
if ( p_Pointer != NULL ) {
return p_Pointer;
} else {
return NULL;
}
Without the other, anything. The fact is that if the pointer is NULL, NULL will be returned, so it would seem pointless to waste this step. However, it seems useful for debugging purposes, because if I went through the debugger, I could check this test if the pointer is NULL or not.
Any comments or suggestions regarding this practice?
source
share