NULL -> 0 where appropriate.
This commit is contained in:
parent
9f144cff85
commit
b9fe2d6cc2
@ -559,7 +559,7 @@ ng_atm_event_func(node_p node, hook_p hook, void *arg, int event)
|
||||
|
||||
/* XXX have to figure out how to get that info */
|
||||
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, NULL);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -579,7 +579,7 @@ ng_atm_event_func(node_p node, hook_p hook, void *arg, int event)
|
||||
chg->vpi = ev->vpi;
|
||||
chg->state = (ev->up != 0);
|
||||
chg->node = NG_NODE_ID(node);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, NULL);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ ng_atm_event_func(node_p node, hook_p hook, void *arg, int event)
|
||||
chg->carrier = (ev->carrier != 0);
|
||||
chg->running = (ev->running != 0);
|
||||
chg->node = NG_NODE_ID(node);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, NULL);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, priv->manage, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -625,7 +625,7 @@ ng_atm_event_func(node_p node, hook_p hook, void *arg, int event)
|
||||
acr->vpi = ev->vpi;
|
||||
acr->acr = ev->acr;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, NULL);
|
||||
NG_SEND_MSG_HOOK(error, node, mesg, vcc->hook, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ text_status(node_p node, struct priv *priv, char *arg, u_int len)
|
||||
sbuf_printf(&sbuf, "lower hook: <not connected>\n");
|
||||
|
||||
sbuf_printf(&sbuf, "sscf state: %s\n",
|
||||
priv->enabled == NULL ? "<disabled>" :
|
||||
priv->enabled == 0 ? "<disabled>" :
|
||||
sscfu_statename(sscfu_getstate(priv->sscf)));
|
||||
|
||||
sbuf_finish(&sbuf);
|
||||
|
@ -390,7 +390,7 @@ ng_btsocket_hci_raw_send_ngmsg(char *path, int cmd, void *arg, int arglen)
|
||||
if (arg != NULL && arglen > 0)
|
||||
bcopy(arg, msg->data, arglen);
|
||||
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, NULL);
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_hci_raw_send_ngmsg */
|
||||
@ -416,7 +416,7 @@ ng_btsocket_hci_raw_send_sync_ngmsg(ng_btsocket_hci_raw_pcb_p pcb, char *path,
|
||||
pcb->token = msg->header.token;
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, NULL);
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
return (error);
|
||||
@ -1149,7 +1149,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
pcb->token = msg->header.token;
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_PATH(error,ng_btsocket_hci_raw_node,msg,path,NULL);
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
@ -1205,7 +1205,7 @@ ng_btsocket_hci_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
pcb->token = msg->header.token;
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_PATH(error,ng_btsocket_hci_raw_node,msg,path,NULL);
|
||||
NG_SEND_MSG_PATH(error, ng_btsocket_hci_raw_node, msg, path, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
|
@ -250,7 +250,7 @@ ng_btsocket_l2cap_node_shutdown(node_p node)
|
||||
|
||||
error = ng_name_node(ng_btsocket_l2cap_node,
|
||||
NG_BTSOCKET_L2CAP_NODE_TYPE);
|
||||
if (error != NULL) {
|
||||
if (error != 0) {
|
||||
NG_BTSOCKET_L2CAP_ALERT(
|
||||
"%s: Could not name Netgraph node, error=%d\n", __func__, error);
|
||||
|
||||
@ -1194,7 +1194,7 @@ ng_btsocket_l2cap_send_l2ca_con_req(ng_btsocket_l2cap_pcb_p pcb)
|
||||
bcopy(&pcb->dst, &ip->bdaddr, sizeof(ip->bdaddr));
|
||||
ip->psm = pcb->psm;
|
||||
|
||||
NG_SEND_MSG_HOOK(error,ng_btsocket_l2cap_node,msg,pcb->rt->hook,NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_send_l2ca_con_req */
|
||||
@ -1229,7 +1229,7 @@ ng_btsocket_l2cap_send_l2ca_con_rsp_req(u_int32_t token,
|
||||
ip->result = result;
|
||||
ip->status = 0;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg, rt->hook, NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg, rt->hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_send_l2ca_con_rsp_req */
|
||||
@ -1265,7 +1265,7 @@ ng_btsocket_l2cap_send_l2ca_cfg_req(ng_btsocket_l2cap_pcb_p pcb)
|
||||
ip->flush_timo = pcb->flush_timo;
|
||||
ip->link_timo = pcb->link_timo;
|
||||
|
||||
NG_SEND_MSG_HOOK(error,ng_btsocket_l2cap_node,msg,pcb->rt->hook,NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_send_l2ca_cfg_req */
|
||||
@ -1299,7 +1299,7 @@ ng_btsocket_l2cap_send_l2ca_cfg_rsp(ng_btsocket_l2cap_pcb_p pcb)
|
||||
ip->omtu = pcb->omtu;
|
||||
bcopy(&pcb->iflow, &ip->iflow, sizeof(ip->iflow));
|
||||
|
||||
NG_SEND_MSG_HOOK(error,ng_btsocket_l2cap_node,msg,pcb->rt->hook,NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg, pcb->rt->hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_send_l2ca_cfg_rsp */
|
||||
@ -1332,7 +1332,7 @@ ng_btsocket_l2cap_send_l2ca_discon_req(u_int32_t token,
|
||||
ip = (ng_l2cap_l2ca_discon_ip *)(msg->data);
|
||||
ip->lcid = pcb->cid;
|
||||
|
||||
NG_SEND_MSG_HOOK(error,ng_btsocket_l2cap_node,msg,pcb->rt->hook,NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_node, msg,pcb->rt->hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_send_l2ca_discon_req */
|
||||
|
@ -201,7 +201,7 @@ ng_btsocket_l2cap_raw_node_shutdown(node_p node)
|
||||
|
||||
error = ng_name_node(ng_btsocket_l2cap_raw_node,
|
||||
NG_BTSOCKET_L2CAP_RAW_NODE_TYPE);
|
||||
if (error != NULL) {
|
||||
if (error != 0) {
|
||||
NG_BTSOCKET_L2CAP_RAW_ALERT(
|
||||
"%s: Could not name Netgraph node, error=%d\n", __func__, error);
|
||||
|
||||
@ -856,7 +856,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, NULL);
|
||||
pcb->rt->hook, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
@ -911,7 +911,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, NULL);
|
||||
pcb->rt->hook, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
@ -984,7 +984,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
}
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, NULL);
|
||||
pcb->rt->hook, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
@ -1045,7 +1045,7 @@ ng_btsocket_l2cap_raw_control(struct socket *so, u_long cmd, caddr_t data,
|
||||
ip->info_type = p->info_type;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, NULL);
|
||||
pcb->rt->hook, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
break;
|
||||
@ -1258,7 +1258,7 @@ ng_btsocket_l2cap_raw_send_ngmsg(hook_p hook, int cmd, void *arg, int arglen)
|
||||
if (arg != NULL && arglen > 0)
|
||||
bcopy(arg, msg->data, arglen);
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg, hook, NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg, hook, 0);
|
||||
|
||||
return (error);
|
||||
} /* ng_btsocket_l2cap_raw_send_ngmsg */
|
||||
@ -1284,8 +1284,8 @@ ng_btsocket_l2cap_raw_send_sync_ngmsg(ng_btsocket_l2cap_raw_pcb_p pcb,
|
||||
pcb->token = msg->header.token;
|
||||
pcb->msg = NULL;
|
||||
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, NULL);
|
||||
NG_SEND_MSG_HOOK(error, ng_btsocket_l2cap_raw_node, msg,
|
||||
pcb->rt->hook, 0);
|
||||
if (error != 0) {
|
||||
pcb->token = 0;
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user