clear
This commit is contained in:
		
							parent
							
								
									445ea708a1
								
							
						
					
					
						commit
						5145027ddd
					
				@ -68,7 +68,7 @@ struct car* clear_train(struct car* first, const char* target) {
 | 
			
		||||
            if(x == 0){ 
 | 
			
		||||
                struct car* third = prev->next->next;
 | 
			
		||||
                free(prev->next);
 | 
			
		||||
                prev->next = third;
 | 
			
		||||
                prev->next = third; 
 | 
			
		||||
                return first;
 | 
			
		||||
            }
 | 
			
		||||
            prev = prev->next;
 | 
			
		||||
@ -76,10 +76,9 @@ struct car* clear_train(struct car* first, const char* target) {
 | 
			
		||||
        int x = strcmp(prev->next->value, target);
 | 
			
		||||
        if(x == 0){
 | 
			
		||||
            free(prev->next);
 | 
			
		||||
            //prev->next = NULL;
 | 
			
		||||
            prev->next = NULL;
 | 
			
		||||
            return first;
 | 
			
		||||
 
 | 
			
		||||
        }
 | 
			
		||||
    return first;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user