so_pcb should be a void *.

This commit is contained in:
mycroft 1995-08-17 02:57:20 +00:00
parent 42802ac2fa
commit 873ed30f83
11 changed files with 26 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipc_usrreq.c,v 1.14 1995/08/16 00:29:50 mycroft Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.15 1995/08/17 02:57:20 mycroft Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@ -345,7 +345,7 @@ unp_attach(so)
return (ENOBUFS);
bzero((caddr_t)unp, sizeof(*unp));
unp->unp_socket = so;
so->so_pcb = (caddr_t)unp;
so->so_pcb = unp;
return (0);
}
@ -584,7 +584,7 @@ unp_drop(unp, errno)
so->so_error = errno;
unp_disconnect(unp);
if (so->so_head) {
so->so_pcb = (caddr_t)0;
so->so_pcb = 0;
sofree(so);
m_freem(unp->unp_addr);
free(unp, M_PCB);

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtsock.c,v 1.14 1995/08/12 23:59:27 mycroft Exp $ */
/* $NetBSD: rtsock.c,v 1.15 1995/08/17 02:57:23 mycroft Exp $ */
/*
* Copyright (c) 1988, 1991, 1993
@ -85,8 +85,8 @@ route_usrreq(so, req, m, nam, control)
if (req == PRU_ATTACH) {
MALLOC(rp, struct rawcb *, sizeof(*rp), M_PCB, M_WAITOK);
if (so->so_pcb = (caddr_t)rp)
bzero(so->so_pcb, sizeof(*rp));
if (so->so_pcb = rp)
bzero((caddr_t)so->so_pcb, sizeof(*rp));
}
if (req == PRU_DETACH && rp) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: pk_subr.c,v 1.9 1995/08/04 01:09:57 mycroft Exp $ */
/* $NetBSD: pk_subr.c,v 1.10 1995/08/17 02:57:25 mycroft Exp $ */
/*
* Copyright (c) University of British Columbia, 1984
@ -111,7 +111,7 @@ struct socket *so;
sbreserve (&lcp -> lcd_sb, pk_sendspace);
}
if (so) {
so -> so_pcb = (caddr_t) lcp;
so -> so_pcb = lcp;
so -> so_error = error;
}
return (lcp);

View File

@ -1,4 +1,4 @@
/* $NetBSD: in_pcb.c,v 1.22 1995/08/12 23:59:34 mycroft Exp $ */
/* $NetBSD: in_pcb.c,v 1.23 1995/08/17 02:57:27 mycroft Exp $ */
/*
* Copyright (c) 1982, 1986, 1991, 1993
@ -82,7 +82,7 @@ in_pcballoc(so, table)
inp->inp_table = table;
inp->inp_socket = so;
CIRCLEQ_INSERT_HEAD(&table->inpt_queue, inp, inp_queue);
so->so_pcb = (caddr_t)inp;
so->so_pcb = inp;
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: clnp_raw.c,v 1.7 1995/06/13 07:58:14 mycroft Exp $ */
/* $NetBSD: clnp_raw.c,v 1.8 1995/08/17 02:57:30 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -286,7 +286,7 @@ clnp_usrreq(so, req, m, nam, control)
if (rp == 0)
return (ENOBUFS);
bzero((caddr_t)rp, sizeof *rp);
so->so_pcb = (caddr_t)rp;
so->so_pcb = rp;
break;
case PRU_DETACH:

View File

@ -1,4 +1,4 @@
/* $NetBSD: esis.c,v 1.10 1995/06/13 08:12:33 mycroft Exp $ */
/* $NetBSD: esis.c,v 1.11 1995/08/17 02:57:31 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -189,8 +189,8 @@ struct mbuf *control; /* optional control */
break;
}
MALLOC(rp, struct rawcb *, sizeof(*rp), M_PCB, M_WAITOK);
if (so->so_pcb = (caddr_t)rp) {
bzero(so->so_pcb, sizeof(*rp));
if (so->so_pcb = rp) {
bzero((caddr_t)so->so_pcb, sizeof(*rp));
LIST_INSERT_HEAD(&esis_pcb, rp, rcb_list);
rp->rcb_socket = so;
error = soreserve(so, esis_sendspace, esis_recvspace);

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso_pcb.c,v 1.7 1995/06/13 07:13:32 mycroft Exp $ */
/* $NetBSD: iso_pcb.c,v 1.8 1995/08/17 02:57:33 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -123,7 +123,7 @@ iso_pcballoc(so, head)
isop->isop_socket = so;
insque(isop, head);
if (so)
so->so_pcb = (caddr_t)isop;
so->so_pcb = isop;
return 0;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_output.c,v 1.9 1995/08/16 00:38:54 mycroft Exp $ */
/* $NetBSD: tp_output.c,v 1.10 1995/08/17 02:57:34 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -446,7 +446,7 @@ tp_ctloutput(cmd, so, level, optname, mp)
* the tpcb is gone
*/
if ((so->so_state & (SS_ISCONNECTED | SS_ISCONFIRMING)) == 0) {
if ( so->so_pcb == (caddr_t)0 ) {
if ( so->so_pcb == 0 ) {
error = ENOTCONN; goto done;
}
if ( (tpcb->tp_state == TP_REFWAIT || tpcb->tp_state == TP_CLOSING) &&

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_pcb.c,v 1.9 1995/08/16 00:38:56 mycroft Exp $ */
/* $NetBSD: tp_pcb.c,v 1.10 1995/08/17 02:57:36 mycroft Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -606,7 +606,7 @@ register struct tp_pcb *tpcb;
/* xx_pcballoc sets so_pcb */
error = tpcb->tp_nlproto->nlp_pcballoc(so, tpcb->tp_nlproto->nlp_pcblist);
tpcb->tp_npcb = so->so_pcb;
so->so_pcb = (caddr_t)tpcb;
so->so_pcb = tpcb;
return (error);
}
/*
@ -651,7 +651,7 @@ tp_attach(so, protocol)
tptrace(TPPTmisc, "tp_attach:dom so", dom, so, 0, 0);
ENDTRACE
if (so->so_pcb != NULL) {
if (so->so_pcb != 0) {
return EISCONN; /* socket already part of a connection*/
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ns_pcb.c,v 1.7 1995/08/16 00:32:40 mycroft Exp $ */
/* $NetBSD: ns_pcb.c,v 1.8 1995/08/17 02:57:38 mycroft Exp $ */
/*
* Copyright (c) 1984, 1985, 1986, 1987, 1993
@ -64,7 +64,7 @@ ns_pcballoc(so, head)
bzero((caddr_t)nsp, sizeof(*nsp));
nsp->nsp_socket = so;
insque(nsp, head);
so->so_pcb = (caddr_t)nsp;
so->so_pcb = nsp;
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: socketvar.h,v 1.15 1995/08/04 01:14:55 mycroft Exp $ */
/* $NetBSD: socketvar.h,v 1.16 1995/08/17 02:57:39 mycroft Exp $ */
/*-
* Copyright (c) 1982, 1986, 1990, 1993
@ -48,7 +48,7 @@ struct socket {
short so_options; /* from socket call, see socket.h */
short so_linger; /* time to linger while closing */
short so_state; /* internal state flags SS_*, below */
caddr_t so_pcb; /* protocol control block */
void *so_pcb; /* protocol control block */
struct protosw *so_proto; /* protocol handle */
/*
* Variables for connection queueing.