diff options
author | Matt Caswell <matt@openssl.org> | 2015-10-30 10:05:53 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-11-09 22:48:41 +0000 |
commit | a71edf3ba275b946224b5bcded0a8ecfce1855c0 (patch) | |
tree | 85257ad90882fc4d8d8f73cd91a03b7cc476b9d2 /ssl/ssl_conf.c | |
parent | 3457e7a087a643cb65d67d9d72ec5983a02f5dfe (diff) |
Standardise our style for checking malloc failures
if we have a malloc |x = OPENSSL_malloc(...)| sometimes we check |x|
for NULL and sometimes we treat it as a boolean |if(!x) ...|. Standardise
the approach in libssl.
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'ssl/ssl_conf.c')
-rw-r--r-- | ssl/ssl_conf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c index 9c252fa609..ad20f4434c 100644 --- a/ssl/ssl_conf.c +++ b/ssl/ssl_conf.c @@ -487,12 +487,12 @@ static int cmd_DHParameters(SSL_CONF_CTX *cctx, const char *value) BIO *in = NULL; if (cctx->ctx || cctx->ssl) { in = BIO_new(BIO_s_file()); - if (!in) + if (in == NULL) goto end; if (BIO_read_filename(in, value) <= 0) goto end; dh = PEM_read_bio_DHparams(in, NULL, NULL, NULL); - if (!dh) + if (dh == NULL) goto end; } else return 1; |