Use NULL instead of 0 for pointers
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
b5472a450f
commit
e159cc5e9b
5 changed files with 8 additions and 8 deletions
|
@ -22,7 +22,7 @@
|
||||||
void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
void * dh5_init(struct wpabuf **priv, struct wpabuf **publ)
|
||||||
{
|
{
|
||||||
*publ = dh_init(dh_groups_get(5), priv);
|
*publ = dh_init(dh_groups_get(5), priv);
|
||||||
if (*publ == 0)
|
if (*publ == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return (void *) 1;
|
return (void *) 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ struct p2p_sd_query * p2p_pending_sd_req(struct p2p_data *p2p,
|
||||||
struct p2p_sd_query *q;
|
struct p2p_sd_query *q;
|
||||||
|
|
||||||
if (!(dev->info.dev_capab & P2P_DEV_CAPAB_SERVICE_DISCOVERY))
|
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) {
|
for (q = p2p->sd_queries; q; q = q->next) {
|
||||||
if (q->for_all_peers && !(dev->flags & P2P_DEV_SD_INFO))
|
if (q->for_all_peers && !(dev->flags & P2P_DEV_SD_INFO))
|
||||||
|
|
|
@ -210,7 +210,7 @@ u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
|
||||||
os_free(in_msg);
|
os_free(in_msg);
|
||||||
if (need_more_data)
|
if (need_more_data)
|
||||||
*need_more_data = 1;
|
*need_more_data = 1;
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
ct = pos[0];
|
ct = pos[0];
|
||||||
|
|
||||||
|
|
|
@ -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,
|
static inline void wpa_hexdump_buf_key(int level, const char *title,
|
||||||
const struct wpabuf *buf)
|
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);
|
buf ? wpabuf_len(buf) : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -967,7 +967,7 @@ static enum wps_process_res wps_process_m4(struct wps_data *wps,
|
||||||
return WPS_CONTINUE;
|
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);
|
wpabuf_free(decrypted);
|
||||||
wps->state = SEND_WSC_NACK;
|
wps->state = SEND_WSC_NACK;
|
||||||
return WPS_CONTINUE;
|
return WPS_CONTINUE;
|
||||||
|
@ -1020,7 +1020,7 @@ static enum wps_process_res wps_process_m6(struct wps_data *wps,
|
||||||
return WPS_CONTINUE;
|
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);
|
wpabuf_free(decrypted);
|
||||||
wps->state = SEND_WSC_NACK;
|
wps->state = SEND_WSC_NACK;
|
||||||
return WPS_CONTINUE;
|
return WPS_CONTINUE;
|
||||||
|
@ -1086,8 +1086,8 @@ static enum wps_process_res wps_process_m8(struct wps_data *wps,
|
||||||
return WPS_CONTINUE;
|
return WPS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wps_validate_m8_encr(decrypted, wps->wps->ap, attr->version2 != 0)
|
if (wps_validate_m8_encr(decrypted, wps->wps->ap,
|
||||||
< 0) {
|
attr->version2 != NULL) < 0) {
|
||||||
wpabuf_free(decrypted);
|
wpabuf_free(decrypted);
|
||||||
wps->state = SEND_WSC_NACK;
|
wps->state = SEND_WSC_NACK;
|
||||||
return WPS_CONTINUE;
|
return WPS_CONTINUE;
|
||||||
|
|
Loading…
Reference in a new issue