File 1992-ssl-Refactor-to-avoid-nowarn_match_alias_pats.patch of Package erlang

From 4b99ed1228420da2c87010ccec3e278a07b08cfe Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Thu, 18 Dec 2025 15:52:34 +0100
Subject: [PATCH 2/3] ssl: Refactor to avoid nowarn_match_alias_pats

---
 lib/ssl/src/dtls_client_connection.erl     | 8 ++++----
 lib/ssl/src/dtls_server_connection.erl     | 8 ++++----
 lib/ssl/src/tls_dtls_client_connection.erl | 6 +++---
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/lib/ssl/src/dtls_client_connection.erl b/lib/ssl/src/dtls_client_connection.erl
index 8f016444c6..350169be85 100644
--- a/lib/ssl/src/dtls_client_connection.erl
+++ b/lib/ssl/src/dtls_client_connection.erl
@@ -321,9 +321,9 @@ hello(internal,  #change_cipher_spec{type = <<1>>}, State0) ->
     {State1, Actions0} = dtls_gen_connection:send_handshake_flight(State0, Epoch),
     %% This will reset the retransmission timer by repeating the enter state event
     case dtls_gen_connection:next_event(?STATE(hello), no_record, State1, Actions0) of
-        {next_state, ?STATE(hello), State, Actions} ->
+        {next_state, ?FUNCTION_NAME, State, Actions} ->
             {repeat_state, State, Actions};
-        {next_state, ?STATE(hello), State} ->
+        {next_state, ?FUNCTION_NAME, State} ->
             {repeat_state, State, []};
         {stop, _, _} = Stop ->
             Stop
@@ -397,9 +397,9 @@ certify(internal,  #change_cipher_spec{type = <<1>>}, State0) ->
     {State1, Actions0} = dtls_gen_connection:send_handshake_flight(State0, Epoch),
     %% This will reset the retransmission timer by repeating the enter state event
     case dtls_gen_connection:next_event(?STATE(certify), no_record, State1, Actions0) of
-        {next_state, ?STATE(certify), State, Actions} ->
+        {next_state, ?FUNCTION_NAME, State, Actions} ->
             {repeat_state, State, Actions};
-        {next_state, ?STATE(certify), State} ->
+        {next_state, ?FUNCTION_NAME, State} ->
             {repeat_state, State, []};
         {stop, _, _} = Stop ->
             Stop
diff --git a/lib/ssl/src/dtls_server_connection.erl b/lib/ssl/src/dtls_server_connection.erl
index 88d7d2cc67..34b17f16ec 100644
--- a/lib/ssl/src/dtls_server_connection.erl
+++ b/lib/ssl/src/dtls_server_connection.erl
@@ -295,9 +295,9 @@ hello(internal,  #change_cipher_spec{type = <<1>>}, State0) ->
         dtls_gen_connection:send_handshake_flight(State0, Epoch),
     %% This will reset the retransmission timer by repeating the enter state event
     case dtls_gen_connection:next_event(?STATE(hello), no_record, State1, Actions0) of
-        {next_state, ?STATE(hello), State, Actions} ->
+        {next_state, ?FUNCTION_NAME, State, Actions} ->
             {repeat_state, State, Actions};
-        {next_state, ?STATE(hello), State} ->
+        {next_state, ?FUNCTION_NAME, State} ->
             {repeat_state, State};
         {stop, _, _} = Stop ->
             Stop
@@ -353,10 +353,10 @@ certify(internal,  #change_cipher_spec{type = <<1>>}, State0) ->
     {State1, Actions0} = dtls_gen_connection:send_handshake_flight(State0, Epoch),
     %% This will reset the retransmission timer by repeating the enter state event
     case dtls_gen_connection:next_event(?STATE(certify), no_record, State1, Actions0) of
-        {next_state, ?STATE(certify), State, Actions} ->
+        {next_state, ?FUNCTION_NAME, State, Actions} ->
             dtls_gen_connection:next_event(?STATE(certify), no_record, State1, Actions0),
             {repeat_state, State, Actions};
-        {next_state, ?STATE(certify), State} ->
+        {next_state, ?FUNCTION_NAME, State} ->
             {repeat_state, State, Actions0};
         {stop, _, _} = Stop ->
             Stop
diff --git a/lib/ssl/src/tls_dtls_client_connection.erl b/lib/ssl/src/tls_dtls_client_connection.erl
index 3601852d42..d4b18ade24 100644
--- a/lib/ssl/src/tls_dtls_client_connection.erl
+++ b/lib/ssl/src/tls_dtls_client_connection.erl
@@ -613,9 +613,9 @@ calculate_secret(#server_dhe_psk_params{
 			    Connection, certify, certify);
 calculate_secret(#server_ecdhe_psk_params{
                     dh_params = #server_ecdh_params{curve = ECCurve}} = ServerKey,
-                 #state{ssl_options = #{user_lookup_fun := PSKLookup}} =
-		     #state{handshake_env = HsEnv,
-                            session = Session} = State, Connection) ->
+                 #state{handshake_env = HsEnv,
+                        ssl_options = #{user_lookup_fun := PSKLookup},
+                        session = Session} = State, Connection) ->
     ECDHKeys = public_key:generate_key(ECCurve),
 
     PremasterSecret = ssl_handshake:premaster_secret(ServerKey, ECDHKeys, PSKLookup),
-- 
2.51.0

openSUSE Build Service is sponsored by