Some whitespace nits and remove a few casts.

This commit is contained in:
John Baldwin 2006-12-29 14:58:18 +00:00
parent 6c296ffa81
commit 08651e1f24
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165634
4 changed files with 11 additions and 7 deletions

View File

@ -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

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}