use CALL_COMMAND_HANDLER instead of direct calls
By using CALL_COMMAND_HANDLER, parameters can be reordered, added, or even removed in inherited signatures, without requiring revisiting all of the various call sites.
This commit is contained in:
@@ -2271,7 +2271,7 @@ COMMAND_HANDLER(handle_gdb_sync_command)
|
||||
/* daemon configuration command gdb_port */
|
||||
COMMAND_HANDLER(handle_gdb_port_command)
|
||||
{
|
||||
return server_port_command(cmd_ctx, cmd, args, argc, &gdb_port);
|
||||
return CALL_COMMAND_HANDLER(server_port_command, &gdb_port);
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(handle_gdb_memory_map_command)
|
||||
|
||||
@@ -172,7 +172,7 @@ int tcl_init(void)
|
||||
|
||||
COMMAND_HANDLER(handle_tcl_port_command)
|
||||
{
|
||||
return server_port_command(cmd_ctx, cmd, args, argc, &tcl_port);
|
||||
return CALL_COMMAND_HANDLER(server_port_command, &tcl_port);
|
||||
}
|
||||
|
||||
int tcl_register_commands(command_context_t *cmd_ctx)
|
||||
|
||||
@@ -608,7 +608,7 @@ int telnet_init(char *banner)
|
||||
/* daemon configuration command telnet_port */
|
||||
COMMAND_HANDLER(handle_telnet_port_command)
|
||||
{
|
||||
return server_port_command(cmd_ctx, cmd, args, argc, &telnet_port);
|
||||
return CALL_COMMAND_HANDLER(server_port_command, &telnet_port);
|
||||
}
|
||||
|
||||
COMMAND_HANDLER(handle_exit_command)
|
||||
|
||||
Reference in New Issue
Block a user