Fix a few missed "if (!ptr)" cleanups

And a scalar !x --> x==0 test
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
This commit is contained in:
Rich Salz
2015-11-23 13:30:04 -05:00
committed by Rich Salz
parent e44380a990
commit cc99bfa76b
3 changed files with 5 additions and 6 deletions

View File

@@ -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);