mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Sync OpenBSD patchset 769:
Skip NULL entries in the sessions list when choosing the next session, from Simon Olofsson.
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: server-fn.c,v 1.111 2010-10-09 14:29:32 tcunha Exp $ */
 | 
					/* $Id: server-fn.c,v 1.112 2010-10-09 14:31:14 tcunha Exp $ */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
					 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
				
			||||||
@@ -368,7 +368,7 @@ server_next_session(struct session *s)
 | 
				
			|||||||
	s_out = NULL;
 | 
						s_out = NULL;
 | 
				
			||||||
	for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
 | 
						for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
 | 
				
			||||||
		s_loop = ARRAY_ITEM(&sessions, i);
 | 
							s_loop = ARRAY_ITEM(&sessions, i);
 | 
				
			||||||
		if (s_loop == s)
 | 
							if (s_loop == NULL || s_loop == s)
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		if (s_out == NULL ||
 | 
							if (s_out == NULL ||
 | 
				
			||||||
		    timercmp(&s_loop->activity_time, &s_out->activity_time, <))
 | 
							    timercmp(&s_loop->activity_time, &s_out->activity_time, <))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user