From: John Baldwin Date: Fri, 9 Oct 2020 22:12:53 +0000 (-0700) Subject: Collapse two identical if statements into a single body. X-Git-Tag: openssl-3.0.0-alpha10~228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6568d7a93127d097122e2ce10491d06a363929e9;p=thirdparty%2Fopenssl.git Collapse two identical if statements into a single body. These two bodies should be grouped together anyway as the reason for the call to BIO_flush() is to permit using BIO_set_ktls_ctrl_msg(). Reviewed-by: Matt Caswell Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/13090) --- diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c index 9fadeba62da..17ee8bd4834 100644 --- a/ssl/record/rec_layer_s3.c +++ b/ssl/record/rec_layer_s3.c @@ -1189,10 +1189,6 @@ int ssl3_write_pending(SSL *s, int type, const unsigned char *buf, size_t len, i = BIO_flush(s->wbio); if (i <= 0) return i; - } - - if (BIO_get_ktls_send(s->wbio) - && type != SSL3_RT_APPLICATION_DATA) { BIO_set_ktls_ctrl_msg(s->wbio, type); } /* TODO(size_t): Convert this call */