diff options
author | brooks <brooks@FreeBSD.org> | 2005-06-17 23:54:48 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2005-06-17 23:54:48 +0000 |
commit | c99c5450e2d73a20a1b2386daced6928b617a5d8 (patch) | |
tree | 06e93d0f12816ff062049368b0813f3fff300b34 /sys/i4b | |
parent | 60cdf363b4a0cfb33503ad4e6d6726bf3d243c96 (diff) | |
download | FreeBSD-src-c99c5450e2d73a20a1b2386daced6928b617a5d8.zip FreeBSD-src-c99c5450e2d73a20a1b2386daced6928b617a5d8.tar.gz |
Fix a number of now bogus casts I missed the first time around (I must
have failed to grep this file properly).
Reported by: Hans Petter Selasky <hselasky at c2i dot net>
Approved by: re (ifnet blanket)
Diffstat (limited to 'sys/i4b')
-rw-r--r-- | sys/i4b/driver/i4b_isppp.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/i4b/driver/i4b_isppp.c b/sys/i4b/driver/i4b_isppp.c index a7e2f0e..1cacdea 100644 --- a/sys/i4b/driver/i4b_isppp.c +++ b/sys/i4b/driver/i4b_isppp.c @@ -236,7 +236,7 @@ i4bisppp_ioctl(struct ifnet *ifp, IOCTL_CMD_T cmd, caddr_t data) { struct i4bisppp_softc *sc = ifp->if_softc; #if 0 - struct sppp *sp = (struct sppp *)sc; + struct sppp *sp = IFP2SP(sc->sc_ifp); struct ifaddr *ifa = (struct ifaddr *) data; struct ifreq *ifr = (struct ifreq *) data; #endif @@ -379,8 +379,8 @@ i4bisppp_timeout(void *cookie) static void i4bisppp_tls(struct sppp *sp) { - struct i4bisppp_softc *sc = (struct i4bisppp_softc *)sp; struct ifnet *ifp = SP2IFP(sp); + struct i4bisppp_softc *sc = ifp->if_softc; if(sc->sc_state == ST_CONNECTED) return; @@ -395,9 +395,9 @@ i4bisppp_tls(struct sppp *sp) static void i4bisppp_tlf(struct sppp *sp) { - struct i4bisppp_softc *sc = (struct i4bisppp_softc *)sp; -/* call_desc_t *cd = sc->sc_cdp; */ struct ifnet *ifp = SP2IFP(sp); + struct i4bisppp_softc *sc = ifp->if_softc; +/* call_desc_t *cd = sc->sc_cdp; */ if(sc->sc_state != ST_CONNECTED) return; @@ -415,7 +415,7 @@ i4bisppp_tlf(struct sppp *sp) static void i4bisppp_state_changed(struct sppp *sp, int new_state) { - struct i4bisppp_softc *sc = (struct i4bisppp_softc *)sp; + struct i4bisppp_softc *sc = SP2IFP(sp)->if_softc; i4b_l4_ifstate_changed(sc->sc_cdp, new_state); } @@ -427,7 +427,7 @@ i4bisppp_state_changed(struct sppp *sp, int new_state) static void i4bisppp_negotiation_complete(struct sppp *sp) { - struct i4bisppp_softc *sc = (struct i4bisppp_softc *)sp; + struct i4bisppp_softc *sc = SP2IFP(sp)->if_softc; i4b_l4_negcomplete(sc->sc_cdp); } @@ -623,8 +623,7 @@ i4bisppp_tx_queue_empty(int unit) time_t i4bisppp_idletime(int unit) { - struct sppp *sp; - sp = (struct sppp *) &i4bisppp_softc[unit]; + struct sppp *sp = IFP2SP((&i4bisppp_softc[unit])->sc_ifp); return((sp->pp_last_recv < sp->pp_last_sent) ? sp->pp_last_sent : sp->pp_last_recv); |