mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Replace the various identical error callbacks with a single one in cmd-queue.c.
This commit is contained in:
		| @@ -1768,18 +1768,6 @@ server_client_command_done(struct cmdq_item *item, __unused void *data) | ||||
| 	return (CMD_RETURN_NORMAL); | ||||
| } | ||||
|  | ||||
| /* Show an error message. */ | ||||
| static enum cmd_retval | ||||
| server_client_command_error(struct cmdq_item *item, void *data) | ||||
| { | ||||
| 	char	*error = data; | ||||
|  | ||||
| 	cmdq_error(item, "%s", error); | ||||
| 	free(error); | ||||
|  | ||||
| 	return (CMD_RETURN_NORMAL); | ||||
| } | ||||
|  | ||||
| /* Handle command message. */ | ||||
| static void | ||||
| server_client_dispatch_command(struct client *c, struct imsg *imsg) | ||||
| @@ -1827,7 +1815,8 @@ server_client_dispatch_command(struct client *c, struct imsg *imsg) | ||||
| 	return; | ||||
|  | ||||
| error: | ||||
| 	cmdq_append(c, cmdq_get_callback(server_client_command_error, cause)); | ||||
| 	cmdq_append(c, cmdq_get_error(cause)); | ||||
| 	free(cause); | ||||
|  | ||||
| 	if (cmdlist != NULL) | ||||
| 		cmd_list_free(cmdlist); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm