summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-12-29 14:58:18 +0000
committerjhb <jhb@FreeBSD.org>2006-12-29 14:58:18 +0000
commit9adb288460c6cbdf8d3f74594b66975f95a5e1ba (patch)
tree0bd6e69cb90f1df729e2f5b249d86380dbbb5e91 /sys/netinet/ip_divert.c
parent0a6fe7fb48fdccbd2170eb8e5bf80936caee4088 (diff)
downloadFreeBSD-src-9adb288460c6cbdf8d3f74594b66975f95a5e1ba.zip
FreeBSD-src-9adb288460c6cbdf8d3f74594b66975f95a5e1ba.tar.gz
Some whitespace nits and remove a few casts.
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index c9c4694..24806ef 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -128,7 +128,8 @@ div_zone_change(void *tag)
static int
div_inpcb_init(void *mem, int size, int flags)
{
- struct inpcb *inp = (struct inpcb *) mem;
+ struct inpcb *inp = mem;
+
INP_LOCK_INIT(inp, "inp", "divinp");
return (0);
}
@@ -136,11 +137,11 @@ div_inpcb_init(void *mem, int size, int flags)
static void
div_inpcb_fini(void *mem, int size)
{
- struct inpcb *inp = (struct inpcb *) mem;
+ struct inpcb *inp = mem;
+
INP_LOCK_DESTROY(inp);
}
-
void
div_init(void)
{
@@ -155,7 +156,8 @@ div_init(void)
divcbinfo.hashbase = hashinit(1, M_PCB, &divcbinfo.hashmask);
divcbinfo.porthashbase = hashinit(1, M_PCB, &divcbinfo.porthashmask);
divcbinfo.ipi_zone = uma_zcreate("divcb", sizeof(struct inpcb),
- NULL, NULL, div_inpcb_init, div_inpcb_fini, UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
+ NULL, NULL, div_inpcb_init, div_inpcb_fini, UMA_ALIGN_PTR,
+ UMA_ZONE_NOFREE);
uma_zone_set_max(divcbinfo.ipi_zone, maxsockets);
EVENTHANDLER_REGISTER(maxsockets_change, div_zone_change,
NULL, EVENTHANDLER_PRI_ANY);
OpenPOWER on IntegriCloud