summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2001-03-28 09:04:25 +0000
committerjhb <jhb@FreeBSD.org>2001-03-28 09:04:25 +0000
commitfc959358c9cfd55db6d055b3af2e84ebcc01f553 (patch)
treedbd6793e9bfe9bc12376a39f840b2680e916192a
parent0c490fd02e5b2a2764a94d809ef8be208b646e39 (diff)
downloadFreeBSD-src-fc959358c9cfd55db6d055b3af2e84ebcc01f553.zip
FreeBSD-src-fc959358c9cfd55db6d055b3af2e84ebcc01f553.tar.gz
Use mtx_initiaalized() rather than violating the internals of the mutex
structure.
-rw-r--r--sys/net/if.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index d7ca2f5..2598907 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -117,8 +117,7 @@ ifinit(dummy)
ifp->if_name, ifp->if_unit);
ifp->if_snd.ifq_maxlen = ifqmaxlen;
}
- /* XXX This is an access violation of the mutex internals. */
- if (ifp->if_snd.ifq_mtx.mtx_description == NULL) {
+ if (!mtx_initialized(&ifp->if_snd.ifq_mtx)) {
printf("%s%d XXX: driver didn't initialize queue mtx\n",
ifp->if_name, ifp->if_unit);
mtx_init(&ifp->if_snd.ifq_mtx, "unknown", MTX_DEF);
OpenPOWER on IntegriCloud