aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2011-11-18 20:07:30 (GMT)
committerJouni Malinen <j@w1.fi>2011-11-18 20:07:30 (GMT)
commite159cc5e9b879a42b2f89405f909393f1aa1d65e (patch)
tree02edc1cfa8cfc1847506b85f81633d4d8cd073a2
parentb5472a450fc1e023a448fc5fc16f7bab93ffbd44 (diff)
downloadhostap-e159cc5e9b879a42b2f89405f909393f1aa1d65e.zip
hostap-e159cc5e9b879a42b2f89405f909393f1aa1d65e.tar.gz
hostap-e159cc5e9b879a42b2f89405f909393f1aa1d65e.tar.bz2
Use NULL instead of 0 for pointers
Signed-hostap: Jouni Malinen <j@w1.fi>
-rw-r--r--src/crypto/dh_group5.c2
-rw-r--r--src/p2p/p2p_sd.c2
-rw-r--r--src/tls/tlsv1_client.c2
-rw-r--r--src/utils/wpa_debug.h2
-rw-r--r--src/wps/wps_enrollee.c8
5 files changed, 8 insertions, 8 deletions
diff --git a/src/crypto/dh_group5.c b/src/crypto/dh_group5.c
index 8c475bf..2a67d99 100644
--- a/src/crypto/dh_group5.c
+++ b/src/crypto/dh_group5.c
@@ -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;
}
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c
index 43b3a61..f53d4b5 100644
--- a/src/p2p/p2p_sd.c
+++ b/src/p2p/p2p_sd.c
@@ -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))
diff --git a/src/tls/tlsv1_client.c b/src/tls/tlsv1_client.c
index a94ca5f..0ac80ec 100644
--- a/src/tls/tlsv1_client.c
+++ b/src/tls/tlsv1_client.c
@@ -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];
diff --git a/src/utils/wpa_debug.h b/src/utils/wpa_debug.h
index ae36afe..64ada57 100644
--- a/src/utils/wpa_debug.h
+++ b/src/utils/wpa_debug.h
@@ -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);
}
diff --git a/src/wps/wps_enrollee.c b/src/wps/wps_enrollee.c
index 5b3c045..0fbaa3f 100644
--- a/src/wps/wps_enrollee.c
+++ b/src/wps/wps_enrollee.c
@@ -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;