Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys audit bitmask test mistake (s/&&/&/). from openbsd



details:   https://anonhg.NetBSD.org/src/rev/c8884a945ffc
branches:  trunk
changeset: 535018:c8884a945ffc
user:      itojun <itojun%NetBSD.org@localhost>
date:      Thu Aug 08 15:08:55 2002 +0000

description:
audit bitmask test mistake (s/&&/&/).  from openbsd

diffstat:

 sys/dev/pci/esa.c      |  4 ++--
 sys/netns/spp_usrreq.c |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r a343565c371a -r c8884a945ffc sys/dev/pci/esa.c
--- a/sys/dev/pci/esa.c Thu Aug 08 14:43:40 2002 +0000
+++ b/sys/dev/pci/esa.c Thu Aug 08 15:08:55 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: esa.c,v 1.13 2002/06/02 18:33:06 jmcneill Exp $ */
+/* $NetBSD: esa.c,v 1.14 2002/08/08 15:08:55 itojun Exp $ */
 
 /*
  * Copyright (c) 2001, 2002 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -1600,7 +1600,7 @@
 
        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 -r a343565c371a -r c8884a945ffc sys/netns/spp_usrreq.c
--- a/sys/netns/spp_usrreq.c    Thu Aug 08 14:43:40 2002 +0000
+++ b/sys/netns/spp_usrreq.c    Thu Aug 08 15:08:55 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spp_usrreq.c,v 1.28 2002/05/12 20:23:49 matt Exp $     */
+/*     $NetBSD: spp_usrreq.c,v 1.29 2002/08/08 15:08:56 itojun Exp $   */
 
 /*
  * Copyright (c) 1984, 1985, 1986, 1987, 1993
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spp_usrreq.c,v 1.28 2002/05/12 20:23:49 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spp_usrreq.c,v 1.29 2002/08/08 15:08:56 itojun Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -475,7 +475,7 @@
                        } /* else queue this packet; */
                } else {
                        /*struct socket *so = cb->s_nspcb->nsp_socket;
-                       if (so->so_state && SS_NOFDREF) {
+                       if (so->so_state & SS_NOFDREF) {
                                ns_error(m0, NS_ERR_NOSOCK, 0);
                                (void)spp_close(cb);
                        } else



Home | Main Index | Thread Index | Old Index