]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use NULL instead of 0 for pointers
authorJouni Malinen <j@w1.fi>
Fri, 18 Nov 2011 20:07:30 +0000 (22:07 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 18 Nov 2011 20:07:30 +0000 (22:07 +0200)
Signed-hostap: Jouni Malinen <j@w1.fi>

src/crypto/dh_group5.c
src/p2p/p2p_sd.c
src/tls/tlsv1_client.c
src/utils/wpa_debug.h
src/wps/wps_enrollee.c

index 8c475bf94ae9fc0ac5c7f394e48e357a11037b32..2a67d99cff1203c2eb7c499ee23c49e95a608206 100644 (file)
@@ -22,7 +22,7 @@
 void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
 {
        *publ = dh_init(dh_groups_get(5), priv);
-       if (*publ == 0)
+       if (*publ == NULL)
                return NULL;
        return (void *) 1;
 }
index 43b3a61c0d5a9c61e1b04ccfbcd8c0fe377e8386..f53d4b52c1130bc3812f15ac1c6f640448577e89 100644 (file)
@@ -27,7 +27,7 @@ struct p2p_sd_query * p2p_pending_sd_req(struct p2p_data *p2p,
        struct p2p_sd_query *q;
 
        if (!(dev->info.dev_capab & P2P_DEV_CAPAB_SERVICE_DISCOVERY))
-               return 0; /* peer does not support SD */
+               return NULL; /* peer does not support SD */
 
        for (q = p2p->sd_queries; q; q = q->next) {
                if (q->for_all_peers && !(dev->flags & P2P_DEV_SD_INFO))
index a94ca5fdc1aa9fde1e4bc931e51e3a1efaa7ed20..0ac80ec27c7927d547e3945d61eed98fd96721c9 100644 (file)
@@ -210,7 +210,7 @@ u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
                        os_free(in_msg);
                        if (need_more_data)
                                *need_more_data = 1;
-                       return 0;
+                       return NULL;
                }
                ct = pos[0];
 
index ae36afec50d06a4ff2f97fb1e9c35a16fd032fe9..64ada576baf3516504761a63229ea8d67a43dc6b 100644 (file)
@@ -136,7 +136,7 @@ void wpa_hexdump_key(int level, const char *title, const u8 *buf, size_t len);
 static inline void wpa_hexdump_buf_key(int level, const char *title,
                                       const struct wpabuf *buf)
 {
-       wpa_hexdump_key(level, title, buf ? wpabuf_head(buf) : 0,
+       wpa_hexdump_key(level, title, buf ? wpabuf_head(buf) : NULL,
                        buf ? wpabuf_len(buf) : 0);
 }
 
index 5b3c0450be4e468f98e391e5b91ef77dc89fe192..0fbaa3f6f415d3c1403de1702a1ea63fc6504da8 100644 (file)
@@ -967,7 +967,7 @@ static enum wps_process_res wps_process_m4(struct wps_data *wps,
                return WPS_CONTINUE;
        }
 
-       if (wps_validate_m4_encr(decrypted, attr->version2 != 0) < 0) {
+       if (wps_validate_m4_encr(decrypted, attr->version2 != NULL) < 0) {
                wpabuf_free(decrypted);
                wps->state = SEND_WSC_NACK;
                return WPS_CONTINUE;
@@ -1020,7 +1020,7 @@ static enum wps_process_res wps_process_m6(struct wps_data *wps,
                return WPS_CONTINUE;
        }
 
-       if (wps_validate_m6_encr(decrypted, attr->version2 != 0) < 0) {
+       if (wps_validate_m6_encr(decrypted, attr->version2 != NULL) < 0) {
                wpabuf_free(decrypted);
                wps->state = SEND_WSC_NACK;
                return WPS_CONTINUE;
@@ -1086,8 +1086,8 @@ static enum wps_process_res wps_process_m8(struct wps_data *wps,
                return WPS_CONTINUE;
        }
 
-       if (wps_validate_m8_encr(decrypted, wps->wps->ap, attr->version2 != 0)
-           < 0) {
+       if (wps_validate_m8_encr(decrypted, wps->wps->ap,
+                                attr->version2 != NULL) < 0) {
                wpabuf_free(decrypted);
                wps->state = SEND_WSC_NACK;
                return WPS_CONTINUE;