Author: emaste Date: Wed Mar 18 14:16:14 2020 New Revision: 359070 URL: https://svnweb.freebsd.org/changeset/base/359070
Log: if_muge: use C99 bool for boolean vars Modified: head/sys/dev/usb/net/if_muge.c Modified: head/sys/dev/usb/net/if_muge.c ============================================================================== --- head/sys/dev/usb/net/if_muge.c Wed Mar 18 13:09:47 2020 (r359069) +++ head/sys/dev/usb/net/if_muge.c Wed Mar 18 14:16:14 2020 (r359070) @@ -389,9 +389,10 @@ lan78xx_eeprom_read_raw(struct muge_softc *sc, uint16_ { usb_ticks_t start_ticks; const usb_ticks_t max_ticks = USB_MS_TO_TICKS(1000); - int err, locked; + int err; uint32_t val, saved; uint16_t i; + bool locked; locked = mtx_owned(&sc->sc_mtx); /* XXX */ if (!locked) @@ -483,9 +484,10 @@ static int lan78xx_otp_read_raw(struct muge_softc *sc, uint16_t off, uint8_t *buf, uint16_t buflen) { - int locked, err; + int err; uint32_t val; uint16_t i; + bool locked; locked = mtx_owned(&sc->sc_mtx); if (!locked) MUGE_LOCK(sc); @@ -659,8 +661,8 @@ static int lan78xx_miibus_readreg(device_t dev, int phy, int reg) { struct muge_softc *sc = device_get_softc(dev); - int locked; uint32_t addr, val; + bool locked; val = 0; locked = mtx_owned(&sc->sc_mtx); @@ -712,8 +714,8 @@ static int lan78xx_miibus_writereg(device_t dev, int phy, int reg, int val) { struct muge_softc *sc = device_get_softc(dev); - int locked; uint32_t addr; + bool locked; if (sc->sc_phyno != phy) return (0); @@ -760,10 +762,10 @@ lan78xx_miibus_statchg(device_t dev) struct muge_softc *sc = device_get_softc(dev); struct mii_data *mii = uether_getmii(&sc->sc_ue); struct ifnet *ifp; - int locked; int err; uint32_t flow = 0; uint32_t fct_flow = 0; + bool locked; locked = mtx_owned(&sc->sc_mtx); if (!locked) _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"