]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Remove pointless indentation from tls_process.
authorArne Schwabe <arne@rfc2549.org>
Fri, 22 Apr 2022 14:29:40 +0000 (16:29 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 26 Apr 2022 15:02:18 +0000 (17:02 +0200)
This is probably a result from earlier code that still needed to be
C89 compatible add probably added this to allow variable decleration
Acked-by: Frank Lichtenheld <frank@lichtenheld.com>
Message-Id: <20220422142953.3805364-6-arne@rfc2549.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg24166.html

Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl.c

index 3bfb1c4ae16c4b564e6f6580600d130fa8289aac..2c1cad67058bae55ce390c643521539a3ca29659 100644 (file)
@@ -2775,45 +2775,43 @@ tls_process(struct tls_multi *multi,
     }
 
     /* When should we wake up again? */
+    if (ks->state >= S_INITIAL)
     {
-        if (ks->state >= S_INITIAL)
-        {
-            compute_earliest_wakeup(wakeup,
-                                    reliable_send_timeout(ks->send_reliable));
-
-            if (ks->must_negotiate)
-            {
-                compute_earliest_wakeup(wakeup, ks->must_negotiate - now);
-            }
-        }
+        compute_earliest_wakeup(wakeup,
+                                reliable_send_timeout(ks->send_reliable));
 
-        if (ks->established && session->opt->renegotiate_seconds)
+        if (ks->must_negotiate)
         {
-            compute_earliest_wakeup(wakeup,
-                                    ks->established + session->opt->renegotiate_seconds - now);
+            compute_earliest_wakeup(wakeup, ks->must_negotiate - now);
         }
+    }
 
-        dmsg(D_TLS_DEBUG, "TLS: tls_process: timeout set to %d", *wakeup);
+    if (ks->established && session->opt->renegotiate_seconds)
+    {
+        compute_earliest_wakeup(wakeup,
+                                ks->established + session->opt->renegotiate_seconds - now);
+    }
 
-        /* prevent event-loop spinning by setting minimum wakeup of 1 second */
-        if (*wakeup <= 0)
-        {
-            *wakeup = 1;
+    dmsg(D_TLS_DEBUG, "TLS: tls_process: timeout set to %d", *wakeup);
 
-            /* if we had something to send to remote, but to_link was busy,
-             * let caller know we need to be called again soon */
-            return true;
-        }
+    /* prevent event-loop spinning by setting minimum wakeup of 1 second */
+    if (*wakeup <= 0)
+    {
+        *wakeup = 1;
 
-        /* If any of the state changes resulted in the to_link buffer being
-         * set, we are also active */
-        if (to_link->len)
-        {
-            return true;
-        }
+        /* if we had something to send to remote, but to_link was busy,
+         * let caller know we need to be called again soon */
+        return true;
+    }
 
-        return false;
+    /* If any of the state changes resulted in the to_link buffer being
+     * set, we are also active */
+    if (to_link->len)
+    {
+        return true;
     }
+
+    return false;
 }
 
 /*