summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_ether.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-11-09 13:34:43 +0000
committerru <ru@FreeBSD.org>2005-11-09 13:34:43 +0000
commit862d9807dd32df55901c71382c54c1537618119e (patch)
tree7eba387e3a1ea1d50ba07cff931ea06670d7c467 /sys/netgraph/ng_ether.c
parentdcace5669d81e83aea7a22539593b0f158eb224c (diff)
downloadFreeBSD-src-862d9807dd32df55901c71382c54c1537618119e.zip
FreeBSD-src-862d9807dd32df55901c71382c54c1537618119e.tar.gz
Make IFP2NG() usable as an lvalue.
Diffstat (limited to 'sys/netgraph/ng_ether.c')
-rw-r--r--sys/netgraph/ng_ether.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netgraph/ng_ether.c b/sys/netgraph/ng_ether.c
index 2b70230..484f2a9 100644
--- a/sys/netgraph/ng_ether.c
+++ b/sys/netgraph/ng_ether.c
@@ -68,8 +68,7 @@
#include <netgraph/ng_parse.h>
#include <netgraph/ng_ether.h>
-#define IFP2NG(ifp) ((struct ng_node *)IFP2AC((ifp))->ac_netgraph)
-#define IFP2NG_SET(ifp, val) (IFP2AC((ifp))->ac_netgraph = (val))
+#define IFP2NG(ifp) (IFP2AC((ifp))->ac_netgraph)
/* Per-node private data */
struct private {
@@ -303,7 +302,7 @@ ng_ether_attach(struct ifnet *ifp)
}
NG_NODE_SET_PRIVATE(node, priv);
priv->ifp = ifp;
- IFP2NG_SET(ifp, node);
+ IFP2NG(ifp) = node;
priv->autoSrcAddr = 1;
priv->hwassist = ifp->if_hwassist;
@@ -330,7 +329,7 @@ ng_ether_detach(struct ifnet *ifp)
* So zap it now. XXX We HOPE that anything running at this time
* handles it (as it should in the non netgraph case).
*/
- IFP2NG_SET(ifp, NULL);
+ IFP2NG(ifp) = NULL;
priv->ifp = NULL; /* XXX race if interrupted an output packet */
ng_rmnode_self(node); /* remove all netgraph parts */
}
OpenPOWER on IntegriCloud