aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-19 18:33:04 -0700
committerFlorin Coras <fcoras@cisco.com>2021-05-19 18:33:29 -0700
commit72afc4feb78489cf2f77b1bab46b71a0427133bc (patch)
treed4b38b1f03a2602d43db5524a310bae076c99f58 /src/plugins
parent785458895dac4fd1f337e0b949bf011c363da99a (diff)
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
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/tlsopenssl/tls_openssl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/tlsopenssl/tls_openssl.c b/src/plugins/tlsopenssl/tls_openssl.c
index df8f167cb1f..dd0f96ad4f9 100644
--- a/src/plugins/tlsopenssl/tls_openssl.c
+++ b/src/plugins/tlsopenssl/tls_openssl.c
@@ -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++;
}