Fix a few missed "if (!ptr)" cleanups
[openssl.git] / ssl / ssl_sess.c
index 964274600ce76d5bfdd026b2731ba1053e9753b7..0984445b7781bdbaba185c159cff87f39bfab07c 100644 (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);