mirror of
https://github.com/OpenVPN/openvpn.git
synced 2024-11-23 17:53:49 +08:00
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>
This commit is contained in:
parent
4158f46f64
commit
280150a02a
@ -922,7 +922,7 @@ port_share_open(const char *host,
|
||||
openvpn_close_socket(fd[1]);
|
||||
|
||||
exit(0);
|
||||
return 0; /* NOTREACHED */
|
||||
return NULL; /* NOTREACHED */
|
||||
}
|
||||
|
||||
error:
|
||||
|
@ -705,7 +705,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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user