summaryrefslogtreecommitdiffstats
path: root/regress/lib/libssl/ssl/ssltest.c
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-06-01 14:47:14 +0000
committermiod <miod@openbsd.org>2014-06-01 14:47:14 +0000
commit8b5251ec79227b9658aecc26fe971c0125e2fe17 (patch)
tree6f70cefe9587c67981586ad3243579f508e87664 /regress/lib/libssl/ssl/ssltest.c
parentRemove __bio_h__attr__ wrapper around __attribute__, since earlier statements (diff)
downloadwireguard-openbsd-8b5251ec79227b9658aecc26fe971c0125e2fe17.tar.xz
wireguard-openbsd-8b5251ec79227b9658aecc26fe971c0125e2fe17.zip
Build with WARNINGS=Yes and Werror.
Diffstat (limited to 'regress/lib/libssl/ssl/ssltest.c')
-rw-r--r--regress/lib/libssl/ssl/ssltest.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/regress/lib/libssl/ssl/ssltest.c b/regress/lib/libssl/ssl/ssltest.c
index 879bf4b3eda..38c70906bb5 100644
--- a/regress/lib/libssl/ssl/ssltest.c
+++ b/regress/lib/libssl/ssl/ssltest.c
@@ -458,16 +458,6 @@ main(int argc, char *argv[])
CRYPTO_set_locking_callback(lock_dbg_cb);
- /* enable memory leak checking unless explicitly disabled */
- if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off")))) {
- CRYPTO_malloc_debug_init();
- CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);
- } else {
- /* OPENSSL_DEBUG_MEMORY=off */
- CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);
- }
- CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
-
bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE|BIO_FP_TEXT);
argc--;
@@ -2148,7 +2138,7 @@ psk_client_callback(SSL *ssl, const char *hint, char *identity,
unsigned int psk_len = 0;
ret = snprintf(identity, max_identity_len, "Client_identity");
- if (ret >= max_identity_len || ret == -1)
+ if (ret == -1 || (unsigned int)ret >= max_identity_len)
goto out_err;
if (debug)
fprintf(stderr, "client: created identity '%s' len=%d\n", identity, ret);