summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2013-12-24 20:25:18 +0000
committerdim <dim@FreeBSD.org>2013-12-24 20:25:18 +0000
commitc0103af5cd63e4915d57ba81fc8ed8d3531d64a2 (patch)
tree416e95caeb59b85283725ae60294b22c22c6c41a /sys/netinet
parent1cd822ebc540295278fa70f28c403f14104383dd (diff)
downloadFreeBSD-src-c0103af5cd63e4915d57ba81fc8ed8d3531d64a2.zip
FreeBSD-src-c0103af5cd63e4915d57ba81fc8ed8d3531d64a2.tar.gz
In sys/netinet/in_mcast.c, inm_is_ifp_detached() is only used whenever
KTR is defined, so put it between #ifdef KTR guards. This avoids a warning about a unused function if KTR is not enabled. MFC after: 3 days
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_mcast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c
index e0f6e4d..621957e 100644
--- a/sys/netinet/in_mcast.c
+++ b/sys/netinet/in_mcast.c
@@ -140,7 +140,9 @@ static int in_getmulti(struct ifnet *, const struct in_addr *,
struct in_multi **);
static int inm_get_source(struct in_multi *inm, const in_addr_t haddr,
const int noalloc, struct ip_msource **pims);
+#ifdef KTR
static int inm_is_ifp_detached(const struct in_multi *);
+#endif
static int inm_merge(struct in_multi *, /*const*/ struct in_mfilter *);
static void inm_purge(struct in_multi *);
static void inm_reap(struct in_multi *);
@@ -187,6 +189,7 @@ static STAILQ_HEAD(, ip_moptions) imo_gc_list =
STAILQ_HEAD_INITIALIZER(imo_gc_list);
static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL);
+#ifdef KTR
/*
* Inline function which wraps assertions for a valid ifp.
* The ifnet layer will set the ifma's ifp pointer to NULL if the ifp
@@ -209,6 +212,7 @@ inm_is_ifp_detached(const struct in_multi *inm)
return (ifp == NULL);
}
+#endif
/*
* Initialize an in_mfilter structure to a known state at t0, t1
OpenPOWER on IntegriCloud