diff options
author | jhb <jhb@FreeBSD.org> | 2006-12-29 14:58:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-12-29 14:58:18 +0000 |
commit | 9adb288460c6cbdf8d3f74594b66975f95a5e1ba (patch) | |
tree | 0bd6e69cb90f1df729e2f5b249d86380dbbb5e91 /sys | |
parent | 0a6fe7fb48fdccbd2170eb8e5bf80936caee4088 (diff) | |
download | FreeBSD-src-9adb288460c6cbdf8d3f74594b66975f95a5e1ba.zip FreeBSD-src-9adb288460c6cbdf8d3f74594b66975f95a5e1ba.tar.gz |
Some whitespace nits and remove a few casts.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/in_pcb.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_divert.c | 10 | ||||
-rw-r--r-- | sys/netinet/raw_ip.c | 3 | ||||
-rw-r--r-- | sys/netinet/udp_usrreq.c | 3 |
4 files changed, 11 insertions, 7 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 8817ad8..43306f3 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -182,7 +182,7 @@ in_pcballoc(struct socket *so, struct inpcbinfo *pcbinfo) inp = uma_zalloc(pcbinfo->ipi_zone, M_NOWAIT); if (inp == NULL) return (ENOBUFS); - bzero(inp,inp_zero_size); + bzero(inp, inp_zero_size); inp->inp_pcbinfo = pcbinfo; inp->inp_socket = so; #ifdef MAC 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); diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index e4d65c2..c6900b2 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -128,7 +128,8 @@ rip_zone_change(void *tag) static int rip_inpcb_init(void *mem, int size, int flags) { - struct inpcb *inp = (struct inpcb *) mem; + struct inpcb *inp = mem; + INP_LOCK_INIT(inp, "inp", "rawinp"); return (0); } diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index b0ba537..52c4af5 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -142,7 +142,8 @@ udp_zone_change(void *tag) static int udp_inpcb_init(void *mem, int size, int flags) { - struct inpcb *inp = (struct inpcb *) mem; + struct inpcb *inp = mem; + INP_LOCK_INIT(inp, "inp", "udpinp"); return (0); } |