Replace (char *) NULL by NULL. Replace (char) NULL by '\0'.