tls: fix signed unsigned comparison

On error, the signed value is cast to unsigned.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I0f94422f47e40d7c358118b2df8ab96cf4116dd0
This commit is contained in:
Florin Coras
2021-05-19 18:33:04 -07:00
parent 785458895d
commit 72afc4feb7

View File

@ -181,7 +181,7 @@ openssl_read_from_ssl_into_fifo (svm_fifo_t * f, SSL * ssl)
rv = SSL_read (ssl, fs[i].data, fs[i].len);
read += rv > 0 ? rv : 0;
if (rv < fs[i].len)
if (rv < (int) fs[i].len)
break;
}
@ -205,7 +205,7 @@ openssl_write_from_fifo_into_ssl (svm_fifo_t *f, SSL *ssl, u32 max_len)
{
rv = SSL_write (ssl, fs[i].data, fs[i].len);
wrote += (rv > 0) ? rv : 0;
if (rv < fs[i].len)
if (rv < (int) fs[i].len)
break;
i++;
}