Browse code

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>

Antonio Quartulli authored on 2017/08/11 18:07:44
Showing 3 changed files
... ...
@@ -922,7 +922,7 @@ port_share_open(const char *host,
922 922
         openvpn_close_socket(fd[1]);
923 923
 
924 924
         exit(0);
925
-        return 0; /* NOTREACHED */
925
+        return NULL; /* NOTREACHED */
926 926
     }
927 927
 
928 928
 error:
... ...
@@ -705,7 +705,7 @@ tls_ctx_add_extra_certs(struct tls_root_ctx *ctx, BIO *bio)
705 705
     for (;; )
706 706
     {
707 707
         cert = NULL;
708
-        if (!PEM_read_bio_X509(bio, &cert, 0, NULL)) /* takes ownership of cert */
708
+        if (!PEM_read_bio_X509(bio, &cert, NULL, NULL)) /* takes ownership of cert */
709 709
         {
710 710
             break;
711 711
         }
... ...
@@ -202,8 +202,8 @@ extract_x509_field_ssl(X509_NAME *x509, const char *field_name, char *out,
202 202
 {
203 203
     int lastpos = -1;
204 204
     int tmp = -1;
205
-    X509_NAME_ENTRY *x509ne = 0;
206
-    ASN1_STRING *asn1 = 0;
205
+    X509_NAME_ENTRY *x509ne = NULL;
206
+    ASN1_STRING *asn1 = NULL;
207 207
     unsigned char *buf = NULL;
208 208
     ASN1_OBJECT *field_name_obj = OBJ_txt2obj(field_name, 0);
209 209