mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Return -1 not NULL on error, pointed out by Roy Marples.
This commit is contained in:
		
							
								
								
									
										2
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								cmd.c
									
									
									
									
									
								
							@@ -642,7 +642,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp)
 | 
			
		||||
	 */
 | 
			
		||||
	if ((s = cmd_current_session(ctx)) == NULL) {
 | 
			
		||||
		ctx->error(ctx, "can't establish current session");
 | 
			
		||||
		return (NULL);
 | 
			
		||||
		return (-1);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/* A NULL argument means the current session and "no window" (-1). */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user