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;
}
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))
os_free(in_msg);
if (need_more_data)
*need_more_data = 1;
- return 0;
+ return NULL;
}
ct = pos[0];
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);
}
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;
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;
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;