[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Mon Nov 23 18:52:00 UTC 2015
The branch master has been updated
via cc99bfa76bd25e40672841c78db9cc171be5488b (commit)
from e44380a990a3edf1cd0c190c6459c8c026d53646 (commit)
- Log -----------------------------------------------------------------
commit cc99bfa76bd25e40672841c78db9cc171be5488b
Author: Rich Salz <rsalz at akamai.com>
Date: Mon Nov 23 13:30:04 2015 -0500
Fix a few missed "if (!ptr)" cleanups
And a scalar !x --> x==0 test
Reviewed-by: Kurt Roeckx <kurt at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/bio/bio_lib.c | 4 ++--
crypto/x509/x_x509.c | 5 ++---
ssl/ssl_sess.c | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c
index 6ab471c..0e3469d 100644
--- a/crypto/bio/bio_lib.c
+++ b/crypto/bio/bio_lib.c
@@ -471,7 +471,7 @@ BIO *BIO_find_type(BIO *bio, int type)
{
int mt, mask;
- if (!bio)
+ if (bio == NULL)
return NULL;
mask = type & 0xff;
do {
@@ -491,7 +491,7 @@ BIO *BIO_find_type(BIO *bio, int type)
BIO *BIO_next(BIO *b)
{
- if (!b)
+ if (b == NULL)
return NULL;
return b->next_bio;
}
diff --git a/crypto/x509/x_x509.c b/crypto/x509/x_x509.c
index ad2309c..cab17dd 100644
--- a/crypto/x509/x_x509.c
+++ b/crypto/x509/x_x509.c
@@ -175,12 +175,11 @@ X509 *d2i_X509_AUX(X509 **a, const unsigned char **pp, long length)
/* Save start position */
q = *pp;
- if (!a || *a == NULL) {
+ if (a == NULL || *a == NULL)
freeret = 1;
- }
ret = d2i_X509(a, &q, length);
/* If certificate unreadable then forget it */
- if (!ret)
+ if (ret == NULL)
return NULL;
/* update length */
length -= q - *pp;
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 9642746..0984445 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -466,7 +466,7 @@ int ssl_get_new_session(SSL *s, int session)
* Don't allow the callback to set the session length to zero. nor
* set it higher than it was.
*/
- if (!tmp || (tmp > ss->session_id_length)) {
+ if (tmp == 0 || tmp > ss->session_id_length) {
/* The callback set an illegal length */
SSLerr(SSL_F_SSL_GET_NEW_SESSION,
SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH);
More information about the openssl-commits
mailing list