use NULL instead of (void*)0