When calling panic(), always pass a format string.

This commit is contained in:
Rui Paulo 2010-10-13 17:21:21 +00:00
parent eab0cdc504
commit d28843a449
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213794
8 changed files with 12 additions and 12 deletions

View File

@ -197,7 +197,7 @@ ng_UI_rcvdata(hook_p hook, item_p item)
mtod(m, u_char *)[0] = HDLC_UI;
NG_FWD_NEW_DATA(error, item, priv->downlink, m); /* m -> NULL */
} else
panic(__func__);
panic("%s", __func__);
done:
NG_FREE_M(m); /* does nothing if m == NULL */
@ -234,7 +234,7 @@ ng_UI_disconnect(hook_p hook)
else if (hook == priv->uplink)
priv->uplink = NULL;
else
panic(__func__);
panic("%s", __func__);
/*
* If we are not already shutting down,
* and we have no more hooks, then DO shut down.

View File

@ -256,7 +256,7 @@ nga_rcvdata(hook_p hook, item_p item)
return (nga_rcv_sync(sc, item));
if (hook == sc->async)
return (nga_rcv_async(sc, item));
panic(__func__);
panic("%s", __func__);
}
/*
@ -372,7 +372,7 @@ nga_disconnect(hook_p hook)
else if (hook == sc->sync)
hookp = &sc->sync;
else
panic(__func__);
panic("%s", __func__);
if (!*hookp)
panic("%s 2", __func__);
*hookp = NULL;

View File

@ -396,7 +396,7 @@ ngfrm_rcvdata(hook_p hook, item_p item)
data[3] |= BYTEX_EA;
break;
default:
panic(__func__);
panic("%s", __func__);
}
/* Send it */

View File

@ -391,7 +391,7 @@ ng_gif_demux_disconnect(hook_p hook)
else {
iffam = get_iffam_from_hook(priv, hook);
if (iffam == NULL)
panic(__func__);
panic("%s", __func__);
*get_hook_from_iffam(priv, iffam) = NULL;
}

View File

@ -821,7 +821,7 @@ ng_iface_disconnect(hook_p hook)
const iffam_p iffam = get_iffam_from_hook(priv, hook);
if (iffam == NULL)
panic(__func__);
panic("%s", __func__);
*get_hook_from_iffam(priv, iffam) = NULL;
return (0);
}

View File

@ -440,7 +440,7 @@ switch_on_etype: etype = ntohs(*((const u_int16_t *)ptr));
mtod(m, u_char *)[7] = 0x07;
NG_FWD_NEW_DATA(error, item, priv->downlink, m);
} else
panic(__func__);
panic("%s", __func__);
done:
if (item)
@ -485,7 +485,7 @@ ng_rfc1490_disconnect(hook_p hook)
else if (hook == priv->ethernet)
priv->ethernet = NULL;
else
panic(__func__);
panic("%s", __func__);
return (0);
}

View File

@ -621,7 +621,7 @@ ng_detach_common(struct ngpcb *pcbp, int which)
priv->datasock = NULL;
break;
default:
panic(__func__);
panic("%s", __func__);
}
pcbp->sockdata = NULL;

View File

@ -211,7 +211,7 @@ ngt_disconnect(hook_p hook)
const sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
if (hook != sc->hook)
panic(__func__);
panic("%s", __func__);
NGTLOCK(sc);
sc->hook = NULL;
@ -317,7 +317,7 @@ ngt_rcvdata(hook_p hook, item_p item)
struct mbuf *m;
if (hook != sc->hook)
panic(__func__);
panic("%s", __func__);
NGI_GET_M(item, m);
NG_FREE_ITEM(item);