From 79ad0c90d0ffea8266894e6ec6715ef99036b7bc Mon Sep 17 00:00:00 2001 From: Alexandra Berke Date: Thu, 28 May 2015 13:57:03 -0400 Subject: [PATCH] Without this change you get the following error: comparison of unsigned expression < 0 is alway due to the Wtautological-compare compile flag --- c_src/exmpp_tls_openssl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/c_src/exmpp_tls_openssl.c b/c_src/exmpp_tls_openssl.c index 92fbe5f..770a726 100644 --- a/c_src/exmpp_tls_openssl.c +++ b/c_src/exmpp_tls_openssl.c @@ -441,7 +441,8 @@ exmpp_tls_openssl_control(ErlDrvData drv_data, unsigned int command, case COMMAND_GET_PEER_CERTIFICATE: /* Get the peer certificate. */ cert = SSL_get_peer_certificate(edd->ssl); - if (cert == NULL || (rlen = i2d_X509(cert, NULL)) < 0) { + int rlen = i2d_X509(cert, NULL); + if (cert == NULL || rlen < 0) { to_send = exmpp_new_xbuf(); if (to_send == NULL) return (-1);