diff options
author | Antonio Quartulli | 2017-08-11 17:07:44 +0800 |
---|---|---|
committer | David Sommerseth | 2017-08-11 22:02:44 +0200 |
commit | a5c2cb6046e7e23554b7bd71a52079b559129e0d (patch) | |
tree | 6ce8908654844ca1b093980272e3f1f0ebfcf012 | |
parent | e096613927ee814c8e4ecb1219cfe2ece9bf26bc (diff) | |
download | openvpn-a5c2cb6046e7e23554b7bd71a52079b559129e0d.zip openvpn-a5c2cb6046e7e23554b7bd71a52079b559129e0d.tar.gz |
use NULL instead of 0 when assigning pointers
Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20170811090744.31750-6-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15204.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
(cherry picked from commit 280150a02a117eb0cc9c34e69ebe9ec3f4ded0f4)
-rw-r--r-- | src/openvpn/ps.c | 2 | ||||
-rw-r--r-- | src/openvpn/ssl_openssl.c | 2 | ||||
-rw-r--r-- | src/openvpn/ssl_verify_openssl.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/openvpn/ps.c b/src/openvpn/ps.c index 45e24de..5136a20 100644 --- a/src/openvpn/ps.c +++ b/src/openvpn/ps.c @@ -922,7 +922,7 @@ port_share_open(const char *host, openvpn_close_socket(fd[1]); exit(0); - return 0; /* NOTREACHED */ + return NULL; /* NOTREACHED */ } error: diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index fef85c9..c8356ac 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -708,7 +708,7 @@ tls_ctx_add_extra_certs(struct tls_root_ctx *ctx, BIO *bio) for (;; ) { cert = NULL; - if (!PEM_read_bio_X509(bio, &cert, 0, NULL)) /* takes ownership of cert */ + if (!PEM_read_bio_X509(bio, &cert, NULL, NULL)) /* takes ownership of cert */ { break; } diff --git a/src/openvpn/ssl_verify_openssl.c b/src/openvpn/ssl_verify_openssl.c index d3e3ca0..95b08e0 100644 --- a/src/openvpn/ssl_verify_openssl.c +++ b/src/openvpn/ssl_verify_openssl.c @@ -202,8 +202,8 @@ extract_x509_field_ssl(X509_NAME *x509, const char *field_name, char *out, { int lastpos = -1; int tmp = -1; - X509_NAME_ENTRY *x509ne = 0; - ASN1_STRING *asn1 = 0; + X509_NAME_ENTRY *x509ne = NULL; + ASN1_STRING *asn1 = NULL; unsigned char *buf = NULL; ASN1_OBJECT *field_name_obj = OBJ_txt2obj(field_name, 0); |