要检测p->next 与p都不=NULL while(p->next!=NULL &&p!=NULL) 会导致访问access NULL pointer的runtime错误,因为&&的短路求值特性,会先求左边,而p=NULL时就错误了。