test
This commit is contained in:
		
							parent
							
								
									6a9d07cee3
								
							
						
					
					
						commit
						1cc637bbf4
					
				| @ -53,11 +53,8 @@ struct car* clear_train(struct car* first, const char* target) { | |||||||
| 	} | 	} | ||||||
| 	if(this->next->next == NULL){ | 	if(this->next->next == NULL){ | ||||||
| 		if(strcmp(this->value, target) == 0){ | 		if(strcmp(this->value, target) == 0){ | ||||||
| 			//strcpy(this->value,this->next->value);
 |  | ||||||
| 			//this->next=NULL;
 |  | ||||||
| 			struct car* tmp = this->next; | 			struct car* tmp = this->next; | ||||||
| 			free(this); | 			free(this); | ||||||
| 			//free(this->next);
 |  | ||||||
| 			return tmp; | 			return tmp; | ||||||
| 		}else if(strcmp(this->next->value, target) == 0){ | 		}else if(strcmp(this->next->value, target) == 0){ | ||||||
| 			free(this->next); | 			free(this->next); | ||||||
| @ -80,6 +77,10 @@ struct car* clear_train(struct car* first, const char* target) { | |||||||
| 		free(this->next); | 		free(this->next); | ||||||
| 		this->next=NULL; | 		this->next=NULL; | ||||||
| 		return this; | 		return this; | ||||||
|  | 	}else if(strcmp(this->next->next->value, target) == 0){ | ||||||
|  | 		free(this->next->next); | ||||||
|  | 		this->next=NULL; | ||||||
|  | 		return this; | ||||||
| 	}  | 	}  | ||||||
| 	return first; | 	return first; | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user