remove weird #define MNULL/PCBNULL (NULL should do it just fine)

This commit is contained in:
itojun 2003-08-11 15:17:29 +00:00
parent 497e73e9cf
commit 9ec3d05b38
10 changed files with 68 additions and 79 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iso_pcb.c,v 1.23 2003/08/07 16:33:37 agc Exp $ */
/* $NetBSD: iso_pcb.c,v 1.24 2003/08/11 15:17:29 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -62,7 +62,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: iso_pcb.c,v 1.23 2003/08/07 16:33:37 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: iso_pcb.c,v 1.24 2003/08/11 15:17:29 itojun Exp $");
#include "opt_iso.h"
@ -93,7 +93,6 @@ __KERNEL_RCSID(0, "$NetBSD: iso_pcb.c,v 1.23 2003/08/07 16:33:37 agc Exp $");
#include <netccitt/pk_extern.h>
#endif
#define PCBNULL (struct isopcb *)0
struct iso_addr zeroiso_addr = {
0
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp.trans,v 1.7 2003/08/07 16:33:38 agc Exp $ */
/* $NetBSD: tp.trans,v 1.8 2003/08/11 15:17:29 itojun Exp $ */
/* NEW */
/*-
@ -242,7 +242,7 @@ SAME <== TP_AKWAIT [ CC_TPDU, DC_TPDU, XAK_TPDU ]
SAME <== TP_REFWAIT DR_TPDU
( $$.e_sref != 0 )
{
(void) tp_emit(DC_TPDU_type, $P, 0, 0, MNULL);
(void) tp_emit(DC_TPDU_type, $P, 0, 0, NULL);
}
;
@ -349,7 +349,7 @@ TP_CONFIRMING <== TP_LISTENING CR_TPDU
/* n/a for class 0 */
ASSERT($P.tp_Xrcv.sb_cc == 0);
sbappendrecord(&$P.tp_Xrcv, $$.e_data);
$$.e_data = MNULL;
$$.e_data = NULL;
}
}
;
@ -365,7 +365,7 @@ TP_OPEN <== TP_CONFIRMING T_ACPT_req
printf("Confirming connection: $P" );
ENDDEBUG
soisconnected($P.tp_sock);
(void) tp_emit(CC_TPDU_type, $P, 0,0, MNULL) ;
(void) tp_emit(CC_TPDU_type, $P, 0,0, NULL) ;
$P.tp_fcredit = 1;
}
;
@ -408,7 +408,7 @@ TP_CRSENT <== TP_CLOSED T_CONN_req
DEFAULT
{
int error;
struct mbuf *data = MNULL;
struct mbuf *data = NULL;
IFTRACE(D_CONN)
tptrace(TPPTmisc, "T_CONN_req flags ucddata", (int)$P.tp_flags,
@ -441,7 +441,7 @@ TP_REFWAIT <== [ TP_CRSENT, TP_AKWAIT, TP_OPEN ] DR_TPDU
sbflush(&$P.tp_Xrcv); /* purge non-delivered data data */
if ($$.e_datalen > 0) {
sbappendrecord(&$P.tp_Xrcv, $$.e_data);
$$.e_data = MNULL;
$$.e_data = NULL;
}
if ($P.tp_state == TP_OPEN)
tp_indicate(T_DISCONNECT, $P, 0);
@ -464,7 +464,7 @@ TP_REFWAIT <== [ TP_CRSENT, TP_AKWAIT, TP_OPEN ] DR_TPDU
}
tp_cuntimeout($P, TM_retrans);
if( $$.e_sref != 0 )
(void) tp_emit(DC_TPDU_type, $P, 0, 0, MNULL);
(void) tp_emit(DC_TPDU_type, $P, 0, 0, NULL);
}
}
;
@ -473,7 +473,7 @@ SAME <== TP_CLOSED DR_TPDU
DEFAULT
{
if( $$.e_sref != 0 )
(void) tp_emit(DC_TPDU_type, $P, 0, 0, MNULL);
(void) tp_emit(DC_TPDU_type, $P, 0, 0, NULL);
/* reference timer already set - reset it to be safe (???) */
tp_euntimeout($P, TM_reference); /* all */
tp_etimeout($P, TM_reference, (int)$P.tp_refer_ticks);
@ -523,7 +523,7 @@ TP_REFWAIT <== TP_CLOSING DC_TPDU
SAME <== TP_CLOSED [ CC_TPDU, CR_TPDU ]
DEFAULT
{ /* don't ask me why we have to do this - spec says so */
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_NO_SESSION, MNULL);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_NO_SESSION, NULL);
/* don't bother with retransmissions of the DR */
}
;
@ -551,7 +551,7 @@ TP_CLOSING <== [ TP_AKWAIT, TP_OPEN ] ER_TPDU
tp_indicate(ER_TPDU, $P, $$.e_reason);
$P.tp_retrans = $P.tp_Nretrans;
tp_ctimeout($P, TM_retrans, (int)$P.tp_dr_ticks);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_PROTO_ERR, MNULL);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_PROTO_ERR, NULL);
}
;
/* NBS(6) */
@ -591,10 +591,10 @@ TP_OPEN <== TP_CRSENT CC_TPDU
if ($$.e_datalen > 0) {
ASSERT($P.tp_Xrcv.sb_cc == 0); /* should be empty */
sbappendrecord(&$P.tp_Xrcv, $$.e_data);
$$.e_data = MNULL;
$$.e_data = NULL;
}
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL);
tp_ctimeout($P, TM_inact, (int)$P.tp_inact_ticks);
}
;
@ -603,7 +603,7 @@ TP_OPEN <== TP_CRSENT CC_TPDU
SAME <== TP_CRSENT TM_retrans
( $P.tp_retrans > 0 )
{
struct mbuf *data = MNULL;
struct mbuf *data = NULL;
int error;
IncStat(ts_retrans_cr);
@ -614,7 +614,7 @@ SAME <== TP_CRSENT TM_retrans
printf("TM_retrans.trans m_copy cc 0x%x\n", data);
dump_mbuf($P.tp_ucddata, "sosnd @ TM_retrans");
ENDDEBUG
if( data == MNULL )
if( data == NULL )
return ENOBUFS;
}
@ -684,7 +684,7 @@ TP_OPEN <== TP_AKWAIT DT_TPDU
ENDDEBUG
if (doack) {
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL );
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL );
tp_ctimeout($P, TM_sendack, (int)$P.tp_keepalive_ticks);
} else
tp_ctimeout( $P, TM_sendack, (int)$P.tp_sendack_ticks);
@ -723,7 +723,7 @@ SAME <== TP_OPEN DT_TPDU
ENDDEBUG
if(doack)
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL );
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL );
else
tp_ctimeout_MIN( $P, TM_sendack, (int)$P.tp_sendack_ticks);
@ -753,7 +753,7 @@ SAME <== [ TP_OPEN, TP_AKWAIT ] DT_TPDU
IncStat(ts_dt_niw);
m_freem($$.e_data);
tp_ctimeout($P, TM_inact, (int)$P.tp_inact_ticks);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL );
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL );
}
;
@ -812,7 +812,7 @@ TP_OPEN <== [ TP_OPEN, TP_AKWAIT ] XPD_TPDU
tp_indicate(T_XDATA, $P, 0);
sbwakeup( &$P.tp_Xrcv );
(void) tp_emit(XAK_TPDU_type, $P, $P.tp_Xrcvnxt, 0, MNULL);
(void) tp_emit(XAK_TPDU_type, $P, $P.tp_Xrcvnxt, 0, NULL);
SEQ_INC($P, $P.tp_Xrcvnxt);
}
;
@ -833,7 +833,7 @@ SAME <== TP_OPEN T_USR_Xrcvd
* better for occasional * XPD, when the receiving user doesn't
* want to read the XPD immediately (which is session's behavior).
*
int error = tp_emit(XAK_TPDU_type, $P, $P.tp_Xrcvnxt, 0, MNULL);
int error = tp_emit(XAK_TPDU_type, $P, $P.tp_Xrcvnxt, 0, NULL);
SEQ_INC($P, $P.tp_Xrcvnxt);
return error;
*/
@ -897,7 +897,7 @@ TP_CLOSING <== [ TP_CLOSING, TP_AKWAIT, TP_CRSENT, TP_CONFIRMING ] T_DETACH
DEFAULT
{
struct socket *so = $P.tp_sock;
struct mbuf *data = MNULL;
struct mbuf *data = NULL;
/* detach from parent socket so it can finish closing */
if (so->so_head) {
@ -977,7 +977,7 @@ TP_CLOSING <== TP_AKWAIT TM_retrans
tp_soisdisconnecting($P.tp_sock);
$P.tp_sock->so_error = ETIMEDOUT;
tp_indicate(T_DISCONNECT, $P, ETIMEDOUT);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_CONGEST, MNULL);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_CONGEST, NULL);
$P.tp_retrans = $P.tp_Nretrans;
tp_ctimeout($P, TM_retrans, (int)$P.tp_dr_ticks);
}
@ -1000,7 +1000,7 @@ TP_CLOSING <== TP_OPEN [ TM_inact, TM_retrans, TM_data_retrans ]
tp_soisdisconnecting($P.tp_sock);
$P.tp_sock->so_error = ETIMEDOUT;
tp_indicate(T_DISCONNECT, $P, ETIMEDOUT);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_CONGEST_2, MNULL);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_CONGEST_2, NULL);
$P.tp_retrans = $P.tp_Nretrans;
tp_ctimeout($P, TM_retrans, (int)$P.tp_dr_ticks);
}
@ -1047,7 +1047,7 @@ SAME <== TP_CLOSING TM_retrans
( $P.tp_retrans > 0 )
{
$P.tp_retrans --;
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_DR_NO_REAS, MNULL);
(void) tp_emit(DR_TPDU_type, $P, 0, E_TP_DR_NO_REAS, NULL);
IncStat(ts_retrans_dr);
tp_ctimeout($P, TM_retrans, (int)$P.tp_dr_ticks);
}
@ -1085,7 +1085,7 @@ SAME <== TP_OPEN [ CR_TPDU, CC_TPDU ]
if( $P.tp_class != TP_CLASS_0) {
tp_ctimeout($P, TM_inact, (int)$P.tp_inact_ticks);
if ( $E.ev_number == CC_TPDU )
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL);
}
/* ignore it if class 0 - state tables are blank for this */
}
@ -1179,7 +1179,7 @@ SAME <== TP_OPEN AK_TPDU
if ( !$$.e_fcc_present ) {
/* send ACK with FCC */
IncStat( ts_ackreason[_ACK_FCC_] );
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 1, MNULL);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 1, NULL);
}
tp_ctimeout($P, TM_inact, (int)$P.tp_inact_ticks);
}
@ -1242,7 +1242,7 @@ SAME <== TP_OPEN TM_sendack
$P.tp_sent_lcdt, 0);
ENDTRACE
IncPStat($P, tps_n_TMsendack);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL);
(void) tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL);
if ($P.tp_fcredit == 0) {
if ($P.tp_rxtshift < TP_MAXRXTSHIFT)
$P.tp_rxtshift++;
@ -1290,7 +1290,7 @@ SAME <== TP_OPEN T_USR_rcvd
if (SEQ_GT($P, ack_thresh, $P.tp_sent_uwe)) {
IncStat(ts_ackreason[_ACK_USRRCV_]);
$P.tp_flags &= ~TPF_DELACK;
return tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, MNULL);
return tp_emit(AK_TPDU_type, $P, $P.tp_rcvnxt, 0, NULL);
}
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_emit.c,v 1.17 2003/08/07 16:33:39 agc Exp $ */
/* $NetBSD: tp_emit.c,v 1.18 2003/08/11 15:17:29 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -72,7 +72,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_emit.c,v 1.17 2003/08/07 16:33:39 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_emit.c,v 1.18 2003/08/11 15:17:29 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -193,8 +193,8 @@ tp_emit(dutype, tpcb, seq, eot, data)
if (m) {
m->m_type = TPMT_TPHDR;
mbstat.m_mtypes[TPMT_TPHDR]++;
m->m_next = MNULL;
m->m_nextpkt = MNULL;
m->m_next = NULL;
m->m_nextpkt = NULL;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
@ -210,7 +210,7 @@ tp_emit(dutype, tpcb, seq, eot, data)
goto done;
}
m->m_len = sizeof(struct tpdu);
m->m_nextpkt = MNULL;
m->m_nextpkt = NULL;
hdr = mtod(m, struct tpdu *);
bzero((caddr_t) hdr, sizeof(struct tpdu));
@ -890,7 +890,7 @@ tp_error_emit(error, sref, faddr, laddr, erdata, erlen, tpcb, cons_channel,
return ENOBUFS;
}
m->m_len = sizeof(struct tpdu);
m->m_nextpkt = MNULL;
m->m_nextpkt = NULL;
hdr = mtod(m, struct tpdu *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_inet.c,v 1.23 2003/08/07 16:33:39 agc Exp $ */
/* $NetBSD: tp_inet.c,v 1.24 2003/08/11 15:17:30 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -73,7 +73,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_inet.c,v 1.23 2003/08/07 16:33:39 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_inet.c,v 1.24 2003/08/11 15:17:30 itojun Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@ -547,7 +547,7 @@ tpip_input(m, va_alist)
*/
if ((m = m_pullup(m, iplen + 1)) == MNULL)
if ((m = m_pullup(m, iplen + 1)) == NULL)
goto discard;
CHANGE_MTYPE(m, TPMT_DATA);
@ -559,7 +559,7 @@ tpip_input(m, va_alist)
hdrlen = iplen + 1 + mtod(m, u_char *)[iplen];
if (m->m_len < hdrlen) {
if ((m = m_pullup(m, hdrlen)) == MNULL) {
if ((m = m_pullup(m, hdrlen)) == NULL) {
#ifdef ARGO_DEBUG
if (argo_debug[D_TPINPUT]) {
printf("tp_input, pullup 2!\n");

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_input.c,v 1.15 2003/08/07 16:33:39 agc Exp $ */
/* $NetBSD: tp_input.c,v 1.16 2003/08/11 15:17:30 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -79,7 +79,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_input.c,v 1.15 2003/08/07 16:33:39 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_input.c,v 1.16 2003/08/11 15:17:30 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -134,7 +134,7 @@ tp_inputprep(m)
while (m->m_len < 1) {
/*
* The "m_free" logic if( (m = m_free(m)) == MNULL ) return
* The "m_free" logic if( (m = m_free(m)) == NULL ) return
* (struct mbuf *)0; would cause a system crash if ever
* executed. This logic will be executed if the first mbuf in
* the chain only contains a CLNP header. The m_free routine
@ -145,8 +145,8 @@ tp_inputprep(m)
* calls "panic" if M_PKTHDR is not set. m_pullup is a cheap
* way of keeping the head of the chain from being freed.
*/
if ((m = m_pullup(m, 1)) == MNULL)
return (MNULL);
if ((m = m_pullup(m, 1)) == NULL)
return (NULL);
}
if (((long) m->m_data) & 0x3) {
/*
@ -171,7 +171,7 @@ tp_inputprep(m)
* now pull up the whole tp header
*/
if (m->m_len < hdrlen) {
if ((m = m_pullup(m, hdrlen)) == MNULL) {
if ((m = m_pullup(m, hdrlen)) == NULL) {
IncStat(ts_recv_drop);
return (struct mbuf *) 0;
}
@ -507,7 +507,7 @@ again:
chain_length++;
}
#endif
if (n->m_next == MNULL) {
if (n->m_next == NULL) {
break;
}
n = n->m_next;
@ -1587,7 +1587,7 @@ again:
* prevent m_freem() after tp_driver() from throwing it all
* away
*/
m = MNULL;
m = NULL;
}
IncStat(ts_tpdu_rcvd);
@ -1597,7 +1597,7 @@ again:
tpcb->tp_state, e.ev_number, m);
printf(" e.e_data %p\n", e.TPDU_ATTR(DT).e_data);
printf("takes_data 0x%x m_len 0x%x, tpdu_len 0x%x\n",
takes_data, (m == MNULL) ? 0 : m->m_len, tpdu_len);
takes_data, (m == NULL) ? 0 : m->m_len, tpdu_len);
}
#endif
@ -1636,7 +1636,7 @@ again:
*/
if (takes_data == 0) {
ASSERT(m != MNULL);
ASSERT(m != NULL);
/*
* we already peeled off the prev. tp header so we can just
* pull up some more and repeat
@ -1656,7 +1656,7 @@ again:
goto again;
}
}
if (m != MNULL) {
if (m != NULL) {
#ifdef ARGO_DEBUG
if (argo_debug[D_TPINPUT]) {
printf("tp_input : m_freem(%p)\n", m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_output.c,v 1.23 2003/08/07 16:33:40 agc Exp $ */
/* $NetBSD: tp_output.c,v 1.24 2003/08/11 15:17:30 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -62,7 +62,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_output.c,v 1.23 2003/08/07 16:33:40 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_output.c,v 1.24 2003/08/11 15:17:30 itojun Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@ -417,7 +417,7 @@ tp_ctloutput(cmd, so, level, optname, mp)
error = ENOTSOCK;
goto done;
}
if (*mp == MNULL) {
if (*mp == NULL) {
struct mbuf *m;
MGET(m, M_DONTWAIT, TPMT_SONAME); /* does off, type, next */
@ -449,7 +449,7 @@ tp_ctloutput(cmd, so, level, optname, mp)
tpcb->tp_state == TP_OPEN &&
(old_credit < tpcb->tp_maxlcredit))
tp_emit(AK_TPDU_type, tpcb,
tpcb->tp_rcvnxt, 0, MNULL);
tpcb->tp_rcvnxt, 0, NULL);
tpcb->tp_rhiwat = so->so_rcv.sb_hiwat;
}
goto done;
@ -693,7 +693,7 @@ tp_ctloutput(cmd, so, level, optname, mp)
error = EMSGSIZE;
goto done;
}
(*mp)->m_next = MNULL;
(*mp)->m_next = NULL;
(*mp)->m_nextpkt = 0;
if (tpcb->tp_ucddata)
m_cat(tpcb->tp_ucddata, *mp);
@ -710,7 +710,7 @@ tp_ctloutput(cmd, so, level, optname, mp)
tpcb->tp_flags, so->so_snd.sb_cc, val_len, 0);
}
#endif
*mp = MNULL;
*mp = NULL;
if (optname == TPOPT_CFRM_DATA && (so->so_state & SS_ISCONFIRMING))
(void) tp_confirm(tpcb);
}
@ -753,7 +753,7 @@ done:
if (*mp) {
if (cmd == PRCO_SETOPT) {
m_freem(*mp);
*mp = MNULL;
*mp = NULL;
} else {
ASSERT(m_compress(*mp, mp) <= MLEN);
if (error)

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_param.h,v 1.13 2003/08/07 16:33:40 agc Exp $ */
/* $NetBSD: tp_param.h,v 1.14 2003/08/11 15:17:30 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -230,9 +230,6 @@ extern int N_TPREF;
#define TP_FORCE 0x1
#define TP_STRICT 0x2
#ifndef MNULL
#define MNULL (struct mbuf *)0
#endif /* MNULL */
/*
* if ../sys/mbuf.h gets MT_types up to 0x40, these will have to be changed:
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_subr.c,v 1.17 2003/08/07 16:33:41 agc Exp $ */
/* $NetBSD: tp_subr.c,v 1.18 2003/08/11 15:17:31 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -67,7 +67,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_subr.c,v 1.17 2003/08/07 16:33:41 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_subr.c,v 1.18 2003/08/11 15:17:31 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -563,7 +563,7 @@ tp_send(tpcb)
*/
mb = m;
m = m_copy(mb, 0, M_COPYALL);
if (m == MNULL)
if (m == NULL)
break;
#ifdef TPPT
if (tp_traceflags[D_STASH]) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_subr2.c,v 1.21 2003/08/07 16:33:42 agc Exp $ */
/* $NetBSD: tp_subr2.c,v 1.22 2003/08/11 15:17:31 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -66,7 +66,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_subr2.c,v 1.21 2003/08/07 16:33:42 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_subr2.c,v 1.22 2003/08/11 15:17:31 itojun Exp $");
/*
* this def'n is to cause the expansion of this macro in the routine
@ -111,13 +111,6 @@ __KERNEL_RCSID(0, "$NetBSD: tp_subr2.c,v 1.21 2003/08/07 16:33:42 agc Exp $");
#include <netiso/cons.h>
#include <netiso/clnp.h>
#ifdef TRUE
#undef MNULL
#undef FALSE
#undef TRUE
#endif
#include <netccitt/x25.h>
#include <netccitt/pk.h>
#include <netccitt/pk_var.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_usrreq.c,v 1.22 2003/08/07 16:33:43 agc Exp $ */
/* $NetBSD: tp_usrreq.c,v 1.23 2003/08/11 15:17:31 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -65,7 +65,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_usrreq.c,v 1.22 2003/08/07 16:33:43 agc Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_usrreq.c,v 1.23 2003/08/11 15:17:31 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -111,7 +111,7 @@ dump_mbuf(n, str)
printf("dump %s\n", str);
if (n == MNULL) {
if (n == NULL) {
printf("EMPTY:\n");
return;
}
@ -184,7 +184,7 @@ tp_rcvoob(tpcb, so, m, outflags, inflags)
#endif
/* if you use soreceive */
if (m == MNULL)
if (m == NULL)
return ENOBUFS;
restart:
@ -226,7 +226,7 @@ restart:
m->m_len = 0;
/* Assuming at most one xpd tpdu is in the buffer at once */
while (n != MNULL) {
while (n != NULL) {
m->m_len += n->m_len;
bcopy(mtod(n, caddr_t), mtod(m, caddr_t), (unsigned) n->m_len);
m->m_data += n->m_len; /* so mtod() in bcopy() above gives