libtls: Some code style fixes
authorTobias Brunner <tobias@strongswan.org>
Tue, 25 Aug 2020 14:32:40 +0000 (16:32 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 12 Feb 2021 10:45:44 +0000 (11:45 +0100)
src/libtls/tls_fragmentation.c
src/libtls/tls_peer.c
src/libtls/tls_protection.c

index f74cf59..483613f 100644 (file)
@@ -296,7 +296,7 @@ METHOD(tls_fragmentation_t, process, status_t,
                        {
                                break;
                        }
-                       /* fall */
+                       /* fall-through */
                case TLS_APPLICATION_DATA:
                        status = process_application(this, reader);
                        break;
index 471ba49..dea39fb 100644 (file)
@@ -1611,9 +1611,8 @@ METHOD(tls_handshake_t, finished, bool,
        {
                if (this->resume)
                {
-               return this->state == STATE_FINISHED_SENT;
+                       return this->state == STATE_FINISHED_SENT;
                }
-
                return this->state == STATE_FINISHED_RECEIVED;
        }
        else
index d286e17..3d0ec48 100644 (file)
@@ -73,7 +73,7 @@ METHOD(tls_protection_t, process, status_t,
                return NEED_MORE;
        }
 
-       if (this-> version < TLS_1_3 ||
+       if (this->version < TLS_1_3 ||
                type == TLS_APPLICATION_DATA)
        {
                if (this->aead_in)
@@ -99,7 +99,7 @@ METHOD(tls_protection_t, build, status_t,
        status = this->compression->build(this->compression, type, data);
        if (status == NEED_MORE)
        {
-               if (this-> version < TLS_1_3 && *type == TLS_CHANGE_CIPHER_SPEC)
+               if (*type == TLS_CHANGE_CIPHER_SPEC && this->version < TLS_1_3)
                {
                        return status;
                }