summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_ciph.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-10-30 10:05:53 +0000
committerMatt Caswell <matt@openssl.org>2015-11-09 22:48:41 +0000
commita71edf3ba275b946224b5bcded0a8ecfce1855c0 (patch)
tree85257ad90882fc4d8d8f73cd91a03b7cc476b9d2 /ssl/ssl_ciph.c
parent3457e7a087a643cb65d67d9d72ec5983a02f5dfe (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_ciph.c')
-rw-r--r--ssl/ssl_ciph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 581c8a06ae..0cecd929a3 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -1039,7 +1039,7 @@ static int ssl_cipher_strength_sort(CIPHER_ORDER **head_p,
}
number_uses = OPENSSL_zalloc(sizeof(int) * (max_strength_bits + 1));
- if (!number_uses) {
+ if (number_uses == NULL) {
SSLerr(SSL_F_SSL_CIPHER_STRENGTH_SORT, ERR_R_MALLOC_FAILURE);
return (0);
}