svn commit: r367250 - head/sys/net
Konstantin Belousov
kib at FreeBSD.org
Sun Nov 1 16:30:18 UTC 2020
Author: kib
Date: Sun Nov 1 16:30:17 2020
New Revision: 367250
URL: https://svnweb.freebsd.org/changeset/base/367250
Log:
Cleanup of net/if_media.c: some style.
Reviewed by: hselasky
Sponsored by: Mellanox Technologies/NVidia Networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D27034
Modified:
head/sys/net/if_media.c
Modified: head/sys/net/if_media.c
==============================================================================
--- head/sys/net/if_media.c Sun Nov 1 16:25:35 2020 (r367249)
+++ head/sys/net/if_media.c Sun Nov 1 16:30:17 2020 (r367250)
@@ -213,7 +213,7 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, st
int error = 0;
if (ifp == NULL || ifr == NULL || ifm == NULL)
- return(EINVAL);
+ return (EINVAL);
switch (cmd) {
/*
@@ -243,10 +243,9 @@ ifmedia_ioctl(struct ifnet *ifp, struct ifreq *ifr, st
* Keep going in case the connected media changed.
* Similarly, if best match changed (kernel debugger?).
*/
- if ((IFM_SUBTYPE(newmedia) != IFM_AUTO) &&
- (newmedia == ifm->ifm_media) &&
- (match == ifm->ifm_cur))
- return 0;
+ if (IFM_SUBTYPE(newmedia) != IFM_AUTO &&
+ newmedia == ifm->ifm_media && match == ifm->ifm_cur)
+ return (0);
/*
* We found a match, now make the driver switch to it.
@@ -346,7 +345,7 @@ ifmedia_match(struct ifmedia *ifm, int target, int mas
}
}
- return match;
+ return (match);
}
/*
@@ -362,7 +361,8 @@ ifmedia_baudrate(int mword)
int i;
for (i = 0; ifmedia_baudrate_descriptions[i].ifmb_word != 0; i++) {
- if (IFM_TYPE_MATCH(mword, ifmedia_baudrate_descriptions[i].ifmb_word))
+ if (IFM_TYPE_MATCH(mword, ifmedia_baudrate_descriptions[i].
+ ifmb_word))
return (ifmedia_baudrate_descriptions[i].ifmb_baudrate);
}
More information about the svn-src-all
mailing list