[openssl-commits] [openssl] master update

Rich Salz rsalz at openssl.org
Thu Feb 18 14:57:07 UTC 2016


The branch master has been updated
       via  c4c32155f50ba3d7208676c142002fbaaa7d4b4c (commit)
      from  f6fb7f1856d443185c23f1a5968c08b4269dd37d (commit)


- Log -----------------------------------------------------------------
commit c4c32155f50ba3d7208676c142002fbaaa7d4b4c
Author: Zhao Junwang <zhjwpku at gmail.com>
Date:   Thu Feb 18 21:59:32 2016 +0800

    GH706: Use NULL for pointer compare.
    
    As handshake_func is a function pointer, it should compare to NULL
    
    Signed-off-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 ssl/ssl_lib.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c
index 05107e8..c10ab86 100644
--- a/ssl/ssl_lib.c
+++ b/ssl/ssl_lib.c
@@ -1409,7 +1409,7 @@ int SSL_get_async_wait_fd(SSL *s)
 
 int SSL_accept(SSL *s)
 {
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         /* Not properly initialized yet */
         SSL_set_accept_state(s);
     }
@@ -1419,7 +1419,7 @@ int SSL_accept(SSL *s)
 
 int SSL_connect(SSL *s)
 {
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         /* Not properly initialized yet */
         SSL_set_connect_state(s);
     }
@@ -1479,7 +1479,7 @@ static int ssl_io_intern(void *vargs)
 
 int SSL_read(SSL *s, void *buf, int num)
 {
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         SSLerr(SSL_F_SSL_READ, SSL_R_UNINITIALIZED);
         return -1;
     }
@@ -1506,7 +1506,7 @@ int SSL_read(SSL *s, void *buf, int num)
 
 int SSL_peek(SSL *s, void *buf, int num)
 {
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         SSLerr(SSL_F_SSL_PEEK, SSL_R_UNINITIALIZED);
         return -1;
     }
@@ -1531,7 +1531,7 @@ int SSL_peek(SSL *s, void *buf, int num)
 
 int SSL_write(SSL *s, const void *buf, int num)
 {
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         SSLerr(SSL_F_SSL_WRITE, SSL_R_UNINITIALIZED);
         return -1;
     }
@@ -1566,7 +1566,7 @@ int SSL_shutdown(SSL *s)
      * (see ssl3_shutdown).
      */
 
-    if (s->handshake_func == 0) {
+    if (s->handshake_func == NULL) {
         SSLerr(SSL_F_SSL_SHUTDOWN, SSL_R_UNINITIALIZED);
         return -1;
     }


More information about the openssl-commits mailing list