mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Replace TAILQ concatenation loop with TAILQ_CONCAT
As a result remove unneeded variables OK @nicm
This commit is contained in:
		
							
								
								
									
										7
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								cmd.c
									
									
									
									
									
								
							@@ -598,12 +598,7 @@ cmd_list_append(struct cmd_list *cmdlist, struct cmd *cmd)
 | 
				
			|||||||
void
 | 
					void
 | 
				
			||||||
cmd_list_move(struct cmd_list *cmdlist, struct cmd_list *from)
 | 
					cmd_list_move(struct cmd_list *cmdlist, struct cmd_list *from)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct cmd	*cmd, *cmd1;
 | 
						TAILQ_CONCAT(cmdlist->list, from->list, qentry);
 | 
				
			||||||
 | 
					 | 
				
			||||||
	TAILQ_FOREACH_SAFE(cmd, from->list, qentry, cmd1) {
 | 
					 | 
				
			||||||
		TAILQ_REMOVE(from->list, cmd, qentry);
 | 
					 | 
				
			||||||
		TAILQ_INSERT_TAIL(cmdlist->list, cmd, qentry);
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	cmdlist->group = cmd_list_next_group++;
 | 
						cmdlist->group = cmd_list_next_group++;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user