Source-Changes-HG archive

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

[src/nick-nhusb]: src/sys/dev/usb Simplify. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/8e7b75117cda
branches:  nick-nhusb
changeset: 804777:8e7b75117cda
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Feb 03 07:48:05 2017 +0000

description:
Simplify.  No functional change.

diffstat:

 sys/dev/usb/if_axe.c  |  16 ++++++++--------
 sys/dev/usb/if_smsc.c |  14 +++++++-------
 2 files changed, 15 insertions(+), 15 deletions(-)

diffs (65 lines):

diff -r d57b5ce67b8c -r 8e7b75117cda sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Thu Feb 02 07:40:51 2017 +0000
+++ b/sys/dev/usb/if_axe.c      Fri Feb 03 07:48:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.67.4.13 2016/12/12 13:15:39 skrll Exp $   */
+/*     $NetBSD: if_axe.c,v 1.67.4.14 2017/02/03 07:48:05 skrll Exp $   */
 /*     $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
 
 /*
@@ -87,7 +87,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.67.4.13 2016/12/12 13:15:39 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.67.4.14 2017/02/03 07:48:05 skrll Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1877,12 +1877,12 @@
 
        if (error == ENETRESET) {
                error = 0;
-               if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
-                       ;
-               else if (ifp->if_flags & IFF_RUNNING) {
-                       mutex_enter(&sc->axe_lock);
-                       axe_setmulti(sc);
-                       mutex_exit(&sc->axe_lock);
+               if (cmd == SIOCADDMULTI || cmd == SIOCDELMULTI) {
+                       if (ifp->if_flags & IFF_RUNNING) {
+                               mutex_enter(&sc->axe_lock);
+                               axe_setmulti(sc);
+                               mutex_exit(&sc->axe_lock);
+                       }
                }
        }
 
diff -r d57b5ce67b8c -r 8e7b75117cda sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c     Thu Feb 02 07:40:51 2017 +0000
+++ b/sys/dev/usb/if_smsc.c     Fri Feb 03 07:48:05 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_smsc.c,v 1.22.2.29 2017/02/02 07:40:51 skrll Exp $  */
+/*     $NetBSD: if_smsc.c,v 1.22.2.30 2017/02/03 07:48:05 skrll Exp $  */
 
 /*     $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
 /*     $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -978,12 +978,12 @@
 
        if (error == ENETRESET) {
                error = 0;
-               if (cmd != SIOCADDMULTI && cmd != SIOCDELMULTI)
-                       ;
-               else if (ifp->if_flags & IFF_RUNNING) {
-                       mutex_enter(&sc->sc_lock);
-                       smsc_setmulti(sc);
-                       mutex_exit(&sc->sc_lock);
+               if (cmd == SIOCADDMULTI || cmd == SIOCDELMULTI) {
+                       if (ifp->if_flags & IFF_RUNNING) {
+                               mutex_enter(&sc->sc_lock);
+                               smsc_setmulti(sc);
+                               mutex_exit(&sc->sc_lock);
+                       }
                }
        }
        return error;



Home | Main Index | Thread Index | Old Index