Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/net/lib/libshmif make the if-else logic more obvious



details:   https://anonhg.NetBSD.org/src/rev/0c2271063b00
branches:  trunk
changeset: 763152:0c2271063b00
user:      pooka <pooka%NetBSD.org@localhost>
date:      Fri Mar 11 12:11:00 2011 +0000

description:
make the if-else logic more obvious

diffstat:

 sys/rump/net/lib/libshmif/if_shmem.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r af1df24758ec -r 0c2271063b00 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c      Fri Mar 11 12:10:15 2011 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c      Fri Mar 11 12:11:00 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_shmem.c,v 1.37 2011/03/11 12:10:15 pooka Exp $      */
+/*     $NetBSD: if_shmem.c,v 1.38 2011/03/11 12:11:00 pooka Exp $      */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.37 2011/03/11 12:10:15 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.38 2011/03/11 12:11:00 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -707,7 +707,6 @@
                /*
                 * Test if we want to pass the packet upwards
                 */
-               passup = false;
                eth = mtod(m, struct ether_header *);
                if (memcmp(eth->ether_dhost, CLLADDR(ifp->if_sadl),
                    ETHER_ADDR_LEN) == 0) {
@@ -718,6 +717,8 @@
                } else if (ifp->if_flags & IFF_PROMISC) {
                        m->m_flags |= M_PROMISC;
                        passup = true;
+               } else {
+                       passup = false;
                }
 
                if (passup) {



Home | Main Index | Thread Index | Old Index