Maybe NULL is not equal to 0 on Mac? No. In any conforming C implementation NULL has to be #defined either as 0 or ((void *) 0). This may or may not have anything to do with memory address 0. It is a special case, (thankfully) required by the standard, and by essentially all existing C programs.