Source-Changes-HG archive

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

[src/trunk]: src/sys/net KNF. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/387740f3165d
branches:  trunk
changeset: 450699:387740f3165d
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Tue Apr 23 07:29:04 2019 +0000

description:
KNF. No functional change.

diffstat:

 sys/net/if_media.c |  21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diffs (65 lines):

diff -r 1d8ba5d8fc22 -r 387740f3165d sys/net/if_media.c
--- a/sys/net/if_media.c        Tue Apr 23 03:36:45 2019 +0000
+++ b/sys/net/if_media.c        Tue Apr 23 07:29:04 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_media.c,v 1.42 2019/04/22 11:10:52 msaitoh Exp $    */
+/*     $NetBSD: if_media.c,v 1.43 2019/04/23 07:29:04 msaitoh Exp $    */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.42 2019/04/22 11:10:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_media.c,v 1.43 2019/04/23 07:29:04 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,8 +97,8 @@
 /*
  * Compile-time options:
  * IFMEDIA_DEBUG:
- *     turn on implementation-level debug printfs.
- *     Useful for debugging newly-ported  drivers.
+ *     Turn on implementation-level debug printfs.
+ *     Useful for debugging newly-ported drivers.
  */
 
 #ifdef IFMEDIA_DEBUG
@@ -252,13 +252,10 @@
        int error = 0;
 
        if (ifp == NULL || ifr == NULL || ifm == NULL)
-               return (EINVAL);
+               return EINVAL;
 
        switch (cmd) {
-       /*
-        * Set the current media.
-        */
-       case SIOCSIFMEDIA:
+       case SIOCSIFMEDIA:      /* Set the current media. */
        {
                struct ifmedia_entry *oldentry;
                u_int oldmedia;
@@ -310,9 +307,7 @@
                break;
        }
 
-       /*
-        * Get list of available media and current media on interface.
-        */
+       /* Get list of available media and current media on interface. */
        case SIOCGIFMEDIA:
        {
                struct ifmedia_entry *ep;
@@ -455,7 +450,7 @@
        for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) {
                if ((mword & (IFM_NMASK|IFM_TMASK)) ==
                    ifmedia_baudrate_descriptions[i].ifmb_word)
-                       return (ifmedia_baudrate_descriptions[i].ifmb_baudrate);
+                       return ifmedia_baudrate_descriptions[i].ifmb_baudrate;
        }
 
        /* Not known. */



Home | Main Index | Thread Index | Old Index