Use the ISO standard function variable vs. a GCC'ism.

This commit is contained in:
obrien 2005-08-10 06:25:41 +00:00
parent 57f686d55c
commit 0875ef6781
6 changed files with 18 additions and 18 deletions

View File

@ -836,7 +836,7 @@ vatmpif_harp_recv_drain(Vatmpif_unit *vup, KBuffer *m,
if (IS_VATMPIF_DEBUG_PACKET(vup))
atm_dev_pdu_print((Cmn_unit *)vup, (Cmn_vcc *)vvp, m,
__FUNCTION__);
__func__);
/*
* Get packet PDU length

View File

@ -1262,18 +1262,18 @@ ng_atm_attach(struct ifnet *ifp)
node_p node;
struct priv *priv;
KASSERT(IFP2NG(ifp) == 0, ("%s: node alreay exists?", __FUNCTION__));
KASSERT(IFP2NG(ifp) == 0, ("%s: node alreay exists?", __func__));
if (ng_make_node_common(&ng_atm_typestruct, &node) != 0) {
log(LOG_ERR, "%s: can't create node for %s\n",
__FUNCTION__, ifp->if_xname);
__func__, ifp->if_xname);
return;
}
priv = malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);
if (priv == NULL) {
log(LOG_ERR, "%s: can't allocate memory for %s\n",
__FUNCTION__, ifp->if_xname);
__func__, ifp->if_xname);
NG_NODE_UNREF(node);
return;
}
@ -1284,7 +1284,7 @@ ng_atm_attach(struct ifnet *ifp)
if (ng_name_node(node, ifp->if_xname) != 0) {
log(LOG_WARNING, "%s: can't name node %s\n",
__FUNCTION__, ifp->if_xname);
__func__, ifp->if_xname);
}
}

View File

@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$");
#include <netgraph/atm/sscop/ng_sscop_cust.h>
#include <netnatm/saal/sscop.h>
#define DDD printf("%s: %d\n", __FUNCTION__, __LINE__)
#define DDD printf("%s: %d\n", __func__, __LINE__)
#ifdef SSCOP_DEBUG
#define VERBOSE(P,M,F) \

View File

@ -499,7 +499,7 @@ ng_uni_disconnect(hook_p hook)
else if(hook == priv->upper)
priv->upper = NULL;
else
printf("%s: bogus hook %s\n", __FUNCTION__, NG_HOOK_NAME(hook));
printf("%s: bogus hook %s\n", __func__, NG_HOOK_NAME(hook));
if (NG_NODE_NUMHOOKS(node) == 0) {
if (NG_NODE_IS_VALID(node))
@ -543,7 +543,7 @@ ng_uni_rcvupper(hook_p hook, item_p item)
m_freem(m);
if (uni_msg_len(msg) < sizeof(arg)) {
printf("%s: packet too short\n", __FUNCTION__);
printf("%s: packet too short\n", __func__);
uni_msg_destroy(msg);
return (EINVAL);
}
@ -552,7 +552,7 @@ ng_uni_rcvupper(hook_p hook, item_p item)
msg->b_rptr += sizeof(arg);
if (arg.sig >= UNIAPI_MAXSIG) {
printf("%s: bogus signal\n", __FUNCTION__);
printf("%s: bogus signal\n", __func__);
uni_msg_destroy(msg);
return (EINVAL);
}
@ -683,7 +683,7 @@ ng_uni_rcvlower(hook_p hook __unused, item_p item)
if (uni_msg_len(msg) < sizeof(arg)) {
uni_msg_destroy(msg);
printf("%s: packet too short\n", __FUNCTION__);
printf("%s: packet too short\n", __func__);
return (EINVAL);
}
bcopy(msg->b_rptr, &arg, sizeof(arg));
@ -691,7 +691,7 @@ ng_uni_rcvlower(hook_p hook __unused, item_p item)
if (arg.sig > SAAL_UDATA_indication) {
uni_msg_destroy(msg);
printf("%s: bogus signal\n", __FUNCTION__);
printf("%s: bogus signal\n", __func__);
return (EINVAL);
}

View File

@ -297,7 +297,7 @@ ng_fec_get_unit(int *unit)
}
bit = ffs(ng_fec_units[index]) - 1;
KASSERT(bit >= 0 && bit <= UNITS_BITSPERWORD - 1,
("%s: word=%d bit=%d", __FUNCTION__, ng_fec_units[index], bit));
("%s: word=%d bit=%d", __func__, ng_fec_units[index], bit));
ng_fec_units[index] &= ~(1 << bit);
*unit = (index * UNITS_BITSPERWORD) + bit;
ng_units_in_use++;
@ -317,9 +317,9 @@ ng_fec_free_unit(int unit)
bit = unit % UNITS_BITSPERWORD;
mtx_lock(&ng_fec_mtx);
KASSERT(index < ng_fec_units_len,
("%s: unit=%d len=%d", __FUNCTION__, unit, ng_fec_units_len));
("%s: unit=%d len=%d", __func__, unit, ng_fec_units_len));
KASSERT((ng_fec_units[index] & (1 << bit)) == 0,
("%s: unit=%d is free", __FUNCTION__, unit));
("%s: unit=%d is free", __func__, unit));
ng_fec_units[index] |= (1 << bit);
/*
* XXX We could think about reducing the size of ng_fec_units[]

View File

@ -1049,7 +1049,7 @@ ng_l2tp_recv_ctrl(node_p node, item_p item)
/* Sanity check receive ack timer state */
KASSERT((i == 0) ^ callout_pending(&seq->rack_timer),
("%s: xwin %d full but rack timer %s running",
__FUNCTION__, i, callout_pending(&seq->rack_timer) ? "" : "not "));
__func__, i, callout_pending(&seq->rack_timer) ? "" : "not "));
/* If peer's receive window is already full, nothing else to do */
if (i >= seq->cwnd)
@ -1155,7 +1155,7 @@ ng_l2tp_seq_init(priv_p priv)
struct l2tp_seq *const seq = &priv->seq;
KASSERT(priv->conf.peer_win >= 1,
("%s: peer_win is zero", __FUNCTION__));
("%s: peer_win is zero", __func__));
memset(seq, 0, sizeof(*seq));
seq->cwnd = 1;
seq->wmax = priv->conf.peer_win;
@ -1283,7 +1283,7 @@ ng_l2tp_seq_recv_nr(priv_p priv, u_int16_t nr)
return;
}
KASSERT(nack <= L2TP_MAX_XWIN,
("%s: nack=%d > %d", __FUNCTION__, nack, L2TP_MAX_XWIN));
("%s: nack=%d > %d", __func__, nack, L2TP_MAX_XWIN));
/* Update receive ack stats */
seq->rack = nr;
@ -1533,7 +1533,7 @@ ng_l2tp_seq_check(struct l2tp_seq *seq)
const int peer_unack = L2TP_SEQ_DIFF(seq->ns, seq->rack);
int i;
#define CHECK(p) KASSERT((p), ("%s: not: %s", __FUNCTION__, #p))
#define CHECK(p) KASSERT((p), ("%s: not: %s", __func__, #p))
CHECK(seq->wmax <= L2TP_MAX_XWIN);
CHECK(seq->cwnd >= 1);