diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-08-08 13:51:26 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2002-08-08 13:51:26 +0000 |
commit | a2705548511bc2760105bd44edb9810721b98b84 (patch) | |
tree | b63476b887e70f69dc7d14942310b4ae22df07a1 /sys | |
parent | c883a3563709b4411c62a3b6ac39d42bc4c8c257 (diff) |
Use & to test if bits are set, not &&; art@ ok.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/esa.c | 4 | ||||
-rw-r--r-- | sys/netipx/spx_usrreq.c | 4 | ||||
-rw-r--r-- | sys/netiso/iso_pcb.c | 4 | ||||
-rw-r--r-- | sys/netns/spp_usrreq.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 6b40bb447bd..40cf4643c8e 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.2 2002/04/08 06:06:10 deraadt Exp $ */ +/* $OpenBSD: esa.c,v 1.3 2002/08/08 13:51:25 aaron Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -1610,7 +1610,7 @@ esa_power(struct esa_softc *sc, int state) if (pci_get_capability(pc, tag, PCI_CAP_PWRMGMT, &pmcapreg, 0)) { data = pci_conf_read(pc, tag, pmcapreg + 4); - if ((data && PCI_PMCSR_STATE_MASK) != state) + if ((data & PCI_PMCSR_STATE_MASK) != state) pci_conf_write(pc, tag, pmcapreg + 4, state); } diff --git a/sys/netipx/spx_usrreq.c b/sys/netipx/spx_usrreq.c index 6fbac821bc4..0b02ca56f1d 100644 --- a/sys/netipx/spx_usrreq.c +++ b/sys/netipx/spx_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spx_usrreq.c,v 1.18 2002/03/26 19:12:56 niklas Exp $ */ +/* $OpenBSD: spx_usrreq.c,v 1.19 2002/08/08 13:51:25 aaron Exp $ */ /*- * @@ -469,7 +469,7 @@ update_window: } /* else queue this packet; */ } else { /*register struct socket *so = cb->s_ipxpcb->ipxp_socket; - if (so->so_state && SS_NOFDREF) { + if (so->so_state & SS_NOFDREF) { m_freem(m0); (void)spx_close(cb); } else diff --git a/sys/netiso/iso_pcb.c b/sys/netiso/iso_pcb.c index 49808b07680..08bcdf3ba90 100644 --- a/sys/netiso/iso_pcb.c +++ b/sys/netiso/iso_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iso_pcb.c,v 1.4 2002/03/14 01:27:12 millert Exp $ */ +/* $OpenBSD: iso_pcb.c,v 1.5 2002/08/08 13:51:25 aaron Exp $ */ /* $NetBSD: iso_pcb.c,v 1.10 1996/04/13 01:34:56 cgd Exp $ */ /*- @@ -232,7 +232,7 @@ iso_pcbbind(v, nam) bcopy(TSEL(siso), suf.data, sizeof(suf.data)); suf.s = ntohs(suf.s); if ((suf.s < ISO_PORT_RESERVED) && - (isop->isop_socket->so_state && SS_PRIV) == 0) + (isop->isop_socket->so_state & SS_PRIV) == 0) return EACCES; } else { register char *cp; diff --git a/sys/netns/spp_usrreq.c b/sys/netns/spp_usrreq.c index c32a7901459..9c62b625148 100644 --- a/sys/netns/spp_usrreq.c +++ b/sys/netns/spp_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spp_usrreq.c,v 1.13 2002/03/26 19:12:56 niklas Exp $ */ +/* $OpenBSD: spp_usrreq.c,v 1.14 2002/08/08 13:51:25 aaron Exp $ */ /* $NetBSD: spp_usrreq.c,v 1.9 1996/02/13 22:14:13 christos Exp $ */ /* @@ -461,7 +461,7 @@ update_window: } /* else queue this packet; */ } else { /*register struct socket *so = cb->s_nspcb->nsp_socket; - if (so->so_state && SS_NOFDREF) { + if (so->so_state & SS_NOFDREF) { ns_error(dtom(si), NS_ERR_NOSOCK, 0); (void)spp_close(cb); } else |