TRUE -> true, FALSE -> false

This commit is contained in:
thorpej 2007-02-22 06:16:03 +00:00
parent b3667ada6d
commit 7cc07e11dc
12 changed files with 83 additions and 93 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: genfs_vnops.c,v 1.148 2007/02/21 23:00:06 thorpej Exp $ */
/* $NetBSD: genfs_vnops.c,v 1.149 2007/02/22 06:22:24 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.148 2007/02/21 23:00:06 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.149 2007/02/22 06:22:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -437,8 +437,8 @@ genfs_getpages(void *v)
kauth_cred_t cred = curlwp->l_cred; /* XXXUBC curlwp */
bool async = (flags & PGO_SYNCIO) == 0;
bool write = (ap->a_access_type & VM_PROT_WRITE) != 0;
bool sawhole = FALSE;
bool has_trans = FALSE;
bool sawhole = false;
bool has_trans = false;
bool overwrite = (flags & PGO_OVERWRITE) != 0;
bool blockalloc = write && (flags & PGO_NOBLOCKALLOC) == 0;
voff_t origvsize;
@ -603,7 +603,7 @@ startover:
(error = fstrans_start(vp->v_mount, FSTRANS_SHARED)) != 0) {
goto out_err;
}
has_trans = TRUE;
has_trans = true;
/*
* hold g_glock to prevent a race with truncate.
@ -764,7 +764,7 @@ startover:
KASSERT((offset & (PAGE_SIZE - 1)) == 0);
if ((pgs[pidx]->flags & PG_RDONLY)) {
sawhole = TRUE;
sawhole = true;
}
b = MIN(PAGE_SIZE, bytes);
offset += b;
@ -822,7 +822,7 @@ startover:
trunc_page(offset)) >> PAGE_SHIFT;
UVMHIST_LOG(ubchist, "lbn 0x%x -> HOLE", lbn,0,0,0);
sawhole = TRUE;
sawhole = true;
memset((char *)kva + (offset - startoffset), 0,
iobytes);
skipbytes += iobytes;
@ -1055,8 +1055,8 @@ genfs_putpages(void *v)
struct lwp *l = curlwp ? curlwp : &lwp0;
struct genfs_node *gp = VTOG(vp);
int dirtygen;
bool modified = FALSE;
bool has_trans = FALSE;
bool modified = false;
bool has_trans = false;
bool cleanall;
UVMHIST_FUNC("genfs_putpages"); UVMHIST_CALLED(ubchist);
@ -1094,7 +1094,7 @@ genfs_putpages(void *v)
error = fstrans_start(vp->v_mount, FSTRANS_LAZY);
if (error)
return error;
has_trans = TRUE;
has_trans = true;
simple_lock(slock);
}
@ -1168,7 +1168,7 @@ genfs_putpages(void *v)
if (pg->offset < startoff || pg->offset >= endoff ||
pg->flags & (PG_RELEASED|PG_PAGEOUT)) {
if (pg->flags & (PG_RELEASED|PG_PAGEOUT)) {
wasclean = FALSE;
wasclean = false;
}
pg = TAILQ_NEXT(pg, listq);
continue;
@ -1176,7 +1176,7 @@ genfs_putpages(void *v)
off = pg->offset;
} else if (pg == NULL || pg->flags & (PG_RELEASED|PG_PAGEOUT)) {
if (pg != NULL) {
wasclean = FALSE;
wasclean = false;
}
off += PAGE_SIZE;
if (off < endoff) {
@ -1251,7 +1251,7 @@ genfs_putpages(void *v)
pmap_page_protect(pg,
VM_PROT_READ|VM_PROT_EXECUTE);
} else {
cleanall = FALSE;
cleanall = false;
}
}
}
@ -1261,7 +1261,7 @@ genfs_putpages(void *v)
(pg->flags & PG_CLEAN) == 0;
pg->flags |= PG_CLEAN;
} else {
needs_clean = FALSE;
needs_clean = false;
}
/*
@ -1273,7 +1273,7 @@ genfs_putpages(void *v)
if (needs_clean) {
KDASSERT((vp->v_flag & VONWORKLST));
wasclean = FALSE;
wasclean = false;
memset(pgs, 0, sizeof(pgs));
pg->flags |= PG_BUSY;
UVM_PAGE_OWN(pg, "genfs_putpages");
@ -1363,7 +1363,7 @@ genfs_putpages(void *v)
uvm_unlock_pageq();
}
if (needs_clean) {
modified = TRUE;
modified = true;
/*
* start the i/o. if we're traversing by list,
@ -1446,7 +1446,7 @@ skip_scan:
*/
while (vp->v_numoutput != 0) {
vp->v_flag |= VBWAIT;
UVM_UNLOCK_AND_WAIT(&vp->v_numoutput, slock, FALSE,
UVM_UNLOCK_AND_WAIT(&vp->v_numoutput, slock, false,
"genput2", hz);
simple_lock(slock);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp.c,v 1.4 2007/02/21 23:00:06 thorpej Exp $ */
/* $NetBSD: ieee8023ad_lacp.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.4 2007/02/21 23:00:06 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -146,7 +146,7 @@ ieee8023ad_lacp_input(struct ifnet *ifp, struct mbuf *m)
*/
if (tlv_check(du, sizeof(*du), &du->ldu_tlv_actor,
lacp_info_tlv_template, FALSE)) {
lacp_info_tlv_template, false)) {
goto bad;
}
@ -289,8 +289,8 @@ void
lacp_portinit(struct agr_port *port)
{
struct lacp_port *lp = LACP_PORT(port);
bool active = TRUE; /* XXX should be configurable */
bool fast = FALSE; /* XXX should be configurable */
bool active = true; /* XXX should be configurable */
bool fast = false; /* XXX should be configurable */
lp->lp_agrport = port;
lacp_fill_actorinfo(port, &lp->lp_actor);
@ -424,7 +424,7 @@ lacp_transit_expire(void *vp)
s = AGR_LOCK(sc);
LACP_DPRINTF((NULL, "%s\n", __func__));
lsc->lsc_suppress_distributing = FALSE;
lsc->lsc_suppress_distributing = false;
AGR_UNLOCK(sc, s);
}
@ -538,7 +538,7 @@ lacp_suppress_distributing(struct lacp_softc *lsc, struct lacp_aggregator *la)
}
LACP_DPRINTF((NULL, "%s\n", __func__));
lsc->lsc_suppress_distributing = TRUE;
lsc->lsc_suppress_distributing = true;
/* XXX should consider collector max delay */
callout_schedule(&lsc->lsc_transit_callout,
LACP_TRANSIT_DELAY * hz / 1000);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_lacp_select.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $ */
/* $NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.4 2007/02/21 23:00:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_lacp_select.c,v 1.5 2007/02/22 06:20:16 thorpej Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -164,22 +164,22 @@ lacp_aggregator_is_compatible(const struct lacp_aggregator *la,
if (!(lp->lp_state & LACP_STATE_AGGREGATION) ||
!(lp->lp_partner.lip_state & LACP_STATE_AGGREGATION)) {
return FALSE;
return false;
}
if (!(la->la_actor.lip_state & LACP_STATE_AGGREGATION)) {
return FALSE;
return false;
}
if (!lacp_peerinfo_is_compatible(&la->la_partner, &lp->lp_partner)) {
return FALSE;
return false;
}
if (!lacp_peerinfo_is_compatible(&la->la_actor, &lp->lp_actor)) {
return FALSE;
return false;
}
return TRUE;
return true;
}
static bool
@ -189,14 +189,14 @@ lacp_peerinfo_is_compatible(const struct lacp_peerinfo *a,
if (memcmp(&a->lip_systemid, &b->lip_systemid,
sizeof(a->lip_systemid))) {
return FALSE;
return false;
}
if (memcmp(&a->lip_key, &b->lip_key, sizeof(a->lip_key))) {
return FALSE;
return false;
}
return TRUE;
return true;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: ieee8023ad_marker.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
/* $NetBSD: ieee8023ad_marker.c,v 1.4 2007/02/22 06:20:16 thorpej Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.3 2005/12/11 12:24:54 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: ieee8023ad_marker.c,v 1.4 2007/02/22 06:20:16 thorpej Exp $");
#include <sys/param.h>
#include <sys/callout.h>
@ -96,7 +96,7 @@ ieee8023ad_marker_input(struct ifnet *ifp, struct mbuf *m)
switch (mdu->mdu_tlv.tlv_type) {
case MARKER_TYPE_INFO:
if (tlv_check(mdu, sizeof(*mdu), &mdu->mdu_tlv,
marker_info_tlv_template, TRUE)) {
marker_info_tlv_template, true)) {
goto bad;
}
mdu->mdu_tlv.tlv_type = MARKER_TYPE_RESPONSE;
@ -109,7 +109,7 @@ ieee8023ad_marker_input(struct ifnet *ifp, struct mbuf *m)
case MARKER_TYPE_RESPONSE:
if (tlv_check(mdu, sizeof(*mdu), &mdu->mdu_tlv,
marker_response_tlv_template, TRUE)) {
marker_response_tlv_template, true)) {
goto bad;
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_agr.c,v 1.9 2007/02/21 23:00:07 thorpej Exp $ */
/* $NetBSD: if_agr.c,v 1.10 2007/02/22 06:20:16 thorpej Exp $ */
/*-
* Copyright (c)2005 YAMAMOTO Takashi,
@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.9 2007/02/21 23:00:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_agr.c,v 1.10 2007/02/22 06:20:16 thorpej Exp $");
#include "bpfilter.h"
#include "opt_inet.h"
@ -569,7 +569,7 @@ agr_addport(struct ifnet *ifp, struct ifnet *ifp_port)
ifp->if_flags |= IFF_RUNNING;
agrport_config_promisc(port, (ifp->if_flags & IFF_PROMISC) != 0);
error = (*sc->sc_iftop->iftop_configmulti_port)(sc, port, TRUE);
error = (*sc->sc_iftop->iftop_configmulti_port)(sc, port, true);
if (error) {
printf("%s: configmulti error %d\n", __func__, error);
goto cleanup;
@ -644,7 +644,7 @@ agr_remport(struct ifnet *ifp, struct ifnet *ifp_port)
goto out;
}
error = (*sc->sc_iftop->iftop_configmulti_port)(sc, port, FALSE);
error = (*sc->sc_iftop->iftop_configmulti_port)(sc, port, false);
if (error) {
/* XXX XXX */
printf("%s: configmulti_port error %d\n", __func__, error);
@ -683,7 +683,7 @@ agrport_cleanup(struct agr_softc *sc, struct agr_port *port)
int result = 0;
int s;
error = agrport_config_promisc(port, FALSE);
error = agrport_config_promisc(port, false);
if (error) {
printf("%s: config_promisc error %d\n", __func__, error);
result = error;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_icmp.c,v 1.109 2007/02/17 22:34:11 dyoung Exp $ */
/* $NetBSD: ip_icmp.c,v 1.110 2007/02/22 06:17:51 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -101,7 +101,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.109 2007/02/17 22:34:11 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.110 2007/02/22 06:17:51 thorpej Exp $");
#include "opt_ipsec.h"
@ -966,7 +966,7 @@ sysctl_net_inet_icmp_redirtimeout(SYSCTLFN_ARGS)
if (icmp_redirect_timeout_q != NULL) {
if (icmp_redirtimeout == 0) {
rt_timer_queue_destroy(icmp_redirect_timeout_q,
TRUE);
true);
icmp_redirect_timeout_q = NULL;
} else {
rt_timer_queue_change(icmp_redirect_timeout_q,

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_input.c,v 1.260 2007/02/10 09:43:05 degroote Exp $ */
/* $NetBSD: tcp_input.c,v 1.261 2007/02/22 06:17:51 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -152,7 +152,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.260 2007/02/10 09:43:05 degroote Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.261 2007/02/22 06:17:51 thorpej Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -1977,7 +1977,7 @@ after_listen:
}
todrop = tp->rcv_nxt - th->th_seq;
dupseg = FALSE;
dupseg = false;
if (todrop > 0) {
if (tiflags & TH_SYN) {
tiflags &= ~TH_SYN;
@ -2006,7 +2006,7 @@ after_listen:
*/
tp->t_flags |= TF_ACKNOW;
todrop = tlen;
dupseg = TRUE;
dupseg = true;
tcpstat.tcps_rcvdupbyte += todrop;
tcpstat.tcps_rcvduppack++;
} else if ((tiflags & TH_RST) &&

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_output.c,v 1.155 2007/02/21 23:00:08 thorpej Exp $ */
/* $NetBSD: tcp_output.c,v 1.156 2007/02/22 06:17:51 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -142,7 +142,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.155 2007/02/21 23:00:08 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.156 2007/02/22 06:17:51 thorpej Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@ -259,7 +259,7 @@ tcp_segsize(struct tcpcb *tp, int *txsegsizep, int *rxsegsizep,
int hdrlen;
int optlen;
*alwaysfragp = FALSE;
*alwaysfragp = false;
#ifdef DIAGNOSTIC
if (tp->t_inpcb && tp->t_in6pcb)
@ -311,7 +311,7 @@ tcp_segsize(struct tcpcb *tp, int *txsegsizep, int *rxsegsizep,
* attach fragment header.
*/
size = IPV6_MMTU - hdrlen - sizeof(struct ip6_frag);
*alwaysfragp = TRUE;
*alwaysfragp = true;
} else
size = rt->rt_rmx.rmx_mtu - hdrlen;
#else
@ -626,7 +626,7 @@ tcp_output(struct tcpcb *tp)
* - If there is not an IPsec policy that prevents it
* - If the interface can do it
*/
has_tso4 = has_tso6 = FALSE;
has_tso4 = has_tso6 = false;
#if defined(INET)
has_tso4 = tp->t_inpcb != NULL &&
#if defined(IPSEC) || defined(FAST_IPSEC)

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_input.c,v 1.26 2006/09/07 02:40:33 dogcow Exp $ */
/* $NetBSD: tp_input.c,v 1.27 2007/02/22 06:16:03 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -79,7 +79,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_input.c,v 1.26 2006/09/07 02:40:33 dogcow Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_input.c,v 1.27 2007/02/22 06:16:03 thorpej Exp $");
#include "opt_iso.h"
@ -450,7 +450,7 @@ again:
hdr = mtod(m, struct tpdu *);
tpcb = 0;
error = errlen = tpdu_len = 0;
takes_data = fcc_present = FALSE;
takes_data = fcc_present = false;
acktime = 2;
sref = subseq = 0;
fsufxloc = lsufxloc = NULL;
@ -860,7 +860,7 @@ again:
tpcb, tpcb->tp_flags);
}
#endif
takes_data = TRUE;
takes_data = true;
e.TPDU_ATTR(CR).e_cdt = hdr->tpdu_CRcdt;
e.ev_number = CR_TPDU;
@ -1184,7 +1184,7 @@ again:
u_int ylwe;
u_short ysubseq, ycredit;
fcc_present = TRUE;
fcc_present = true;
vb_getval(P, u_int, ylwe);
vb_getval(P, u_short, ysubseq);
vb_getval(P, u_short, ycredit);
@ -1307,7 +1307,7 @@ again:
}
e.TPDU_ATTR(CC).e_sref = sref;
e.TPDU_ATTR(CC).e_cdt = hdr->tpdu_CCcdt;
takes_data = TRUE;
takes_data = true;
e.ev_number = CC_TPDU;
IncStat(ts_CC_rcvd);
break;
@ -1340,7 +1340,7 @@ again:
(1 + (caddr_t) & hdr->tpdu_DRsref - (caddr_t) hdr))
e.TPDU_ATTR(DR).e_reason = hdr->tpdu_DRreason;
e.TPDU_ATTR(DR).e_sref = (u_short) sref;
takes_data = TRUE;
takes_data = true;
e.ev_number = DR_TPDU;
IncStat(ts_DR_rcvd);
break;
@ -1420,7 +1420,7 @@ again:
} else {
e.TPDU_ATTR(XPD).e_seq = hdr->tpdu_XPDseq;
}
takes_data = TRUE;
takes_data = true;
e.ev_number = XPD_TPDU;
IncStat(ts_XPD_rcvd);
IncPStat(tpcb, tps_XPD_rcvd);
@ -1465,7 +1465,7 @@ again:
}
if (e.TPDU_ATTR(DT).e_eot)
IncStat(ts_eot_input);
takes_data = TRUE;
takes_data = true;
e.ev_number = DT_TPDU;
IncStat(ts_DT_rcvd);
IncPStat(tpcb, tps_DT_rcvd);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_param.h,v 1.16 2005/12/11 00:01:36 elad Exp $ */
/* $NetBSD: tp_param.h,v 1.17 2007/02/22 06:16:03 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -206,14 +206,6 @@ extern int N_TPREF;
/******************************************************
* Some fundamental data types
*****************************************************/
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#define TP_LOCAL 22
#define TP_FOREIGN 33

View File

@ -1,4 +1,4 @@
/* $NetBSD: llparse.c,v 1.11 2007/01/18 12:43:38 cbiere Exp $ */
/* $NetBSD: llparse.c,v 1.12 2007/02/22 06:16:03 thorpej Exp $ */
/*
* ************************* NOTICE *******************************
@ -13,7 +13,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: llparse.c,v 1.11 2007/01/18 12:43:38 cbiere Exp $");
__KERNEL_RCSID(0, "$NetBSD: llparse.c,v 1.12 2007/02/22 06:16:03 thorpej Exp $");
#include "xebec.h"
#include "llparse.h"
@ -33,11 +33,11 @@ void prt_token();
int
llparse()
{
register int havetoken = FALSE;
register int havetoken = false;
register int sym;
register LLtoken *t = &lltoken;
register int parseaction;
register int accepted = FALSE;
register int accepted = false;
llpushprod(llnprods-1); /* $$$ ::= <start symbol> */
@ -68,7 +68,7 @@ llparse()
if(!havetoken) {
llgettoken(t);
havetoken = TRUE;
havetoken = true;
}
if(sym == t->llterm) {
@ -76,13 +76,13 @@ llparse()
llaccept(t);
llstackptr--; /* pop terminal */
if(t->llterm == llnterms-1) { /* end symbol $$$ */
accepted = TRUE;
accepted = true;
} else {
havetoken = FALSE;
havetoken = false;
}
} else {
llparsererror(t); /* wrong terminal on input */
havetoken = FALSE;
havetoken = false;
}
continue;
}
@ -91,7 +91,7 @@ llparse()
if(!havetoken) {
llgettoken(t);
havetoken = TRUE;
havetoken = true;
}
/* consult parse table for new production */
@ -100,7 +100,7 @@ llparse()
if(parseaction == 0) {
/* error entry */
llparsererror(t);
havetoken = FALSE;
havetoken = false;
continue;
}
@ -111,7 +111,7 @@ llparse()
llpushprod(parseaction); /* push rhs of production */
} else {
llparsererror(t);
havetoken = FALSE;
havetoken = false;
}
} else {
llstackptr--; /* pop nonterminal */
@ -183,7 +183,7 @@ llepsilonok(term)
IFDEBUG(L)
printf("llepsilonok() enter\n");
ENDDEBUG
rval = TRUE;
rval = true;
ptr = llstackptr;
@ -197,7 +197,7 @@ llepsilonok(term)
}
if(sym < llnterms) {
nomore = TRUE;
nomore = true;
rval = sym == term;
continue;
}
@ -205,17 +205,17 @@ llepsilonok(term)
pact = llfindaction(sym, term);
if(pact == 0) {
nomore = TRUE;
rval = FALSE;
nomore = true;
rval = false;
continue;
}
if(llepsilon[pact] == TRUE) {
if(llepsilon[pact] == true) {
ptr--;
nomore = ptr == 0;
}
else {
nomore = TRUE;
nomore = true;
}
} while(!nomore);

View File

@ -1,7 +1,5 @@
/* $NetBSD: main.h,v 1.7 2005/12/11 12:25:16 christos Exp $ */
/* $NetBSD: main.h,v 1.8 2007/02/22 06:16:03 thorpej Exp $ */
#define TRUE 1
#define FALSE 0
#define LINELEN 2350
/* approx limit on token size for C compiler
* which matters for the purpose of debugging (astring.c...)