In C, these two code fragments do not necessarily give the same result (assume pointers and longs are the same size):
long zero = 0;
struct IVT * ivt_ptr = (struct IVT *)zero;
and
struct IVT * ivt_ptr = 0;
/* or (struct IVT *)0 if you like that better stylistically */
The former gives you a pointer whose bits are all 0. The latter gives you a null pointer. On systems where 0 is a valid memory address the compiler should pick some other address that is not valid.
Similarly, these two are not necessarily the same:
if ( ivt_ptr == 0 ) ...
and
if ( ivt_ptr == (struct IVT *)zero ) ...
/* or if ((long)ivt_ptr == zero ) ... */
0 only represents the null pointer in C when it is the
constant 0.
See this for more information: http://c-faq.com/null/