aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2001-03-28 09:04:25 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2001-03-28 09:04:25 +0000
commit5e980e229f3ed52731211607e437b2f6759ab71a (patch)
treedbd7b9d68578cd2bd80bd7ee54b8edb6aea692c3 /sys/net/if.c
parent192846463a5ff2cdf810b8c41e66af37bf83ae84 (diff)
downloadsrc-5e980e229f3ed52731211607e437b2f6759ab71a.tar.gz
src-5e980e229f3ed52731211607e437b2f6759ab71a.zip
Use mtx_initiaalized() rather than violating the internals of the mutex
structure.
Notes
Notes: svn path=/head/; revision=74913
Diffstat (limited to 'sys/net/if.c')
-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 d7ca2f587c48..2598907761cf 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);