Skip to content

Commit

Permalink
ssh: remove unused Address from function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
u3s committed Aug 30, 2024
1 parent 1ceebf6 commit 6c02d43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions lib/ssh/src/ssh_connection_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
%%====================================================================

%%% Start and stop
-export([start_link/4, start_link/5,
-export([start_link/3, start_link/4,
takeover/4,
stop/1
]).
Expand Down Expand Up @@ -99,10 +99,10 @@
%% Start / stop
%%====================================================================

start_link(Role, Address, Socket, Options) ->
start_link(Role, Address, undefined, Socket, Options).
start_link(Role, Socket, Options) ->
start_link(Role, undefined, Socket, Options).

start_link(Role, _Address=#address{}, Id, Socket, Options) ->
start_link(Role, Id, Socket, Options) ->
case gen_statem:start_link(?MODULE,
[Role, Socket, Options],
[{spawn_opt, [{message_queue_data,off_heap}]}]) of
Expand Down
10 changes: 5 additions & 5 deletions lib/ssh/src/ssh_subsystem_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

-include("ssh.hrl").

-export([start_link/5,
-export([start_link/4,
start_channel/8,
tcpip_fwd_supervisor/1
]).
Expand All @@ -40,8 +40,8 @@
%%%=========================================================================
%%% API
%%%=========================================================================
start_link(Role, Address=#address{}, Id, Socket, Options) ->
case supervisor:start_link(?MODULE, [Role, Address, Id, Socket, Options]) of
start_link(Role, Id, Socket, Options) ->
case supervisor:start_link(?MODULE, [Role, Id, Socket, Options]) of
{error, {shutdown, {failed_to_start_child, _, Error}}} ->
{error,Error};
Other ->
Expand All @@ -59,7 +59,7 @@ tcpip_fwd_supervisor(SubSysSup) ->
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
init([Role, Address, Id, Socket, Options]) ->
init([Role, Id, Socket, Options]) ->
ssh_lib:set_label(Role, {subsystem_sup, Socket}),
SubSysSup = self(),
SupFlags = #{strategy => one_for_all,
Expand All @@ -73,7 +73,7 @@ init([Role, Address, Id, Socket, Options]) ->
significant => true,
start => {ssh_connection_handler,
start_link,
[Role, Address, Id, Socket,
[Role, Id, Socket,
?PUT_INTERNAL_OPT([
{subsystem_sup, SubSysSup}
], Options)
Expand Down
2 changes: 1 addition & 1 deletion lib/ssh/src/ssh_system_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ start_subsystem(Role, Address=#address{}, Socket, Options0) ->
case supervisor:start_child(SysPid,
#{id => Id,
start => {ssh_subsystem_sup, start_link,
[Role,Address,Id,Socket,Options]
[Role,Id,Socket,Options]
},
restart => temporary,
significant => true,
Expand Down

0 comments on commit 6c02d43

Please sign in to comment.