File 4953-ssh-remove-unused-addresses-1.patch of Package erlang

From f5b51919a4a7bc5c4d59a03d5a26f564655a9cf6 Mon Sep 17 00:00:00 2001
From: Jakub Witczak <kuba@erlang.org>
Date: Thu, 9 Nov 2023 09:27:25 +0100
Subject: [PATCH 3/4] ssh: remove unused addresses/1

---
 lib/ssh/src/ssh_system_sup.erl | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index d09b88962e..400f7c441f 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -37,7 +37,6 @@
          start_system/3,
          start_subsystem/4,
 	 get_daemon_listen_address/1,
-         addresses/1,
          addresses/2,
          get_options/2,
          get_acceptor_options/1,
@@ -116,7 +115,6 @@ start_subsystem(Role, Address=#address{}, Socket, Options0) ->
                             {new_connection_ref, Id, ConnPid} ->
                                 ssh_connection_handler:takeover(ConnPid, Role, Socket, Options)
                         after 10000 ->
-
                                 error(timeout)
                         end
                     catch
@@ -136,18 +134,13 @@ start_subsystem(Role, Address=#address{}, Socket, Options0) ->
             Others
     end.
 
-
 %%%----------------------------------------------------------------
 start_link(Role, Address, Options) ->
     supervisor:start_link(?MODULE, [Role, Address, Options]).
 
-
 %%%----------------------------------------------------------------
-addresses(Role) ->
-    addresses(Role,  #address{address=any, port=any, profile=any}).
-
 addresses(Role,  #address{address=Address, port=Port, profile=Profile}) ->
-    [{SysSup,A} || {{ssh_system_sup,A},SysSup,supervisor,_} <- 
+    [{SysSup,A} || {{ssh_system_sup,A},SysSup,supervisor,_} <-
                      supervisor:which_children(sup(Role)),
                  Address == any orelse A#address.address == Address,
                  Port == any    orelse A#address.port == Port,
@@ -155,7 +148,6 @@ addresses(Role,  #address{address=Address, port=Port, profile=Profile}) ->
 
 %%%----------------------------------------------------------------
 %% SysPid is the DaemonRef
-
 get_acceptor_options(SysPid) ->
     case get_daemon_listen_address(SysPid) of
         {ok,Address} ->
@@ -230,8 +222,7 @@ acceptor_sup_child_spec(SysSup, Address, Options) ->
      }.
 
 lookup(SupModule, SystemSup) ->
-    lists:keyfind([SupModule], 4,
-                  supervisor:which_children(SystemSup)).
+    lists:keyfind([SupModule], 4, supervisor:which_children(SystemSup)).
 
 get_system_sup(Role, Address0, Options) ->
     case find_system_sup(Role, Address0) of
-- 
2.35.3

openSUSE Build Service is sponsored by