I have just malloc'd a chunk of memory for a struct with various members.
Some of those members is pointers.
I want to check if the pointer isnt given a value by doing so:
Is it enough to zero-fill the memory, and assume that a zerofilling means the ptr will be NULL?Code:if(structPtr->ptr == NULL) ...;
In other words, is it safe to assume that NULL == 0(or something similar, like (void *) 0)?
Or can NULL be implemented to be -1 or something like that?