From edea42c602854c902b7909a150cd2412d7b8f215 Mon Sep 17 00:00:00 2001 From: Paul Yang Date: Thu, 22 Jun 2017 18:52:29 +0800 Subject: Change to check last return value of BN_CTX_get To make it consistent in the code base Reviewed-by: Matt Caswell Reviewed-by: Bernd Edlinger (Merged from https://github.com/openssl/openssl/pull/3749) --- crypto/bn/bn_x931p.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crypto/bn/bn_x931p.c') diff --git a/crypto/bn/bn_x931p.c b/crypto/bn/bn_x931p.c index 8bfbcac6a4..17bc8c73ca 100644 --- a/crypto/bn/bn_x931p.c +++ b/crypto/bn/bn_x931p.c @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2017 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -62,10 +62,10 @@ int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, return 0; BN_CTX_start(ctx); - if (!p1) + if (p1 == NULL) p1 = BN_CTX_get(ctx); - if (!p2) + if (p2 == NULL) p2 = BN_CTX_get(ctx); t = BN_CTX_get(ctx); -- cgit v1.2.3