mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Remove a redundant if statement.
This commit is contained in:
		@@ -113,26 +113,24 @@ cmd_refresh_client_exec(struct cmd *self, struct cmdq_item *item)
 | 
				
			|||||||
		server_client_set_flags(tc, args_get(args, 'f'));
 | 
							server_client_set_flags(tc, args_get(args, 'f'));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (args_has(args, 'C')) {
 | 
						if (args_has(args, 'C')) {
 | 
				
			||||||
		if (args_has(args, 'C')) {
 | 
							if (~tc->flags & CLIENT_CONTROL) {
 | 
				
			||||||
			if (!(tc->flags & CLIENT_CONTROL)) {
 | 
								cmdq_error(item, "not a control client");
 | 
				
			||||||
				cmdq_error(item, "not a control client");
 | 
								return (CMD_RETURN_ERROR);
 | 
				
			||||||
				return (CMD_RETURN_ERROR);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			size = args_get(args, 'C');
 | 
					 | 
				
			||||||
			if (sscanf(size, "%u,%u", &x, &y) != 2 &&
 | 
					 | 
				
			||||||
			    sscanf(size, "%ux%u", &x, &y) != 2) {
 | 
					 | 
				
			||||||
				cmdq_error(item, "bad size argument");
 | 
					 | 
				
			||||||
				return (CMD_RETURN_ERROR);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			if (x < WINDOW_MINIMUM || x > WINDOW_MAXIMUM ||
 | 
					 | 
				
			||||||
			    y < WINDOW_MINIMUM || y > WINDOW_MAXIMUM) {
 | 
					 | 
				
			||||||
				cmdq_error(item, "size too small or too big");
 | 
					 | 
				
			||||||
				return (CMD_RETURN_ERROR);
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			tty_set_size(&tc->tty, x, y, 0, 0);
 | 
					 | 
				
			||||||
			tc->flags |= CLIENT_SIZECHANGED;
 | 
					 | 
				
			||||||
			recalculate_sizes();
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							size = args_get(args, 'C');
 | 
				
			||||||
 | 
							if (sscanf(size, "%u,%u", &x, &y) != 2 &&
 | 
				
			||||||
 | 
							    sscanf(size, "%ux%u", &x, &y) != 2) {
 | 
				
			||||||
 | 
								cmdq_error(item, "bad size argument");
 | 
				
			||||||
 | 
								return (CMD_RETURN_ERROR);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if (x < WINDOW_MINIMUM || x > WINDOW_MAXIMUM ||
 | 
				
			||||||
 | 
							    y < WINDOW_MINIMUM || y > WINDOW_MAXIMUM) {
 | 
				
			||||||
 | 
								cmdq_error(item, "size too small or too big");
 | 
				
			||||||
 | 
								return (CMD_RETURN_ERROR);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							tty_set_size(&tc->tty, x, y, 0, 0);
 | 
				
			||||||
 | 
							tc->flags |= CLIENT_SIZECHANGED;
 | 
				
			||||||
 | 
							recalculate_sizes();
 | 
				
			||||||
		return (CMD_RETURN_NORMAL);
 | 
							return (CMD_RETURN_NORMAL);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user