Couldn't recognize if(*p == 0) ...
.