From: Tobias Brunner Date: Tue, 25 Aug 2020 14:32:40 +0000 (+0200) Subject: libtls: Some code style fixes X-Git-Tag: 5.9.2rc1~23^2~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba3c90ded16b122163ccc7baf85cf803d7c2c8a6;p=thirdparty%2Fstrongswan.git libtls: Some code style fixes --- diff --git a/src/libtls/tls_fragmentation.c b/src/libtls/tls_fragmentation.c index f74cf59bf3..483613fff1 100644 --- a/src/libtls/tls_fragmentation.c +++ b/src/libtls/tls_fragmentation.c @@ -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; diff --git a/src/libtls/tls_peer.c b/src/libtls/tls_peer.c index 471ba49f72..dea39fb168 100644 --- a/src/libtls/tls_peer.c +++ b/src/libtls/tls_peer.c @@ -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 diff --git a/src/libtls/tls_protection.c b/src/libtls/tls_protection.c index d286e179a7..3d0ec489b1 100644 --- a/src/libtls/tls_protection.c +++ b/src/libtls/tls_protection.c @@ -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; }