Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c,

using jkim's last patch (reviewed by bde) from here:

http://docs.freebsd.org/cgi/mid.cgi?201010141558.03154.jkim

MFC after:	1 week
This commit is contained in:
Dimitry Andric 2011-12-29 17:46:24 +00:00
parent b494482f39
commit 8520ce6001
2 changed files with 6 additions and 2 deletions

View File

@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc
IFP2SP(d->ifp)->pp_flags &= ~(PP_FR);
IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE;
d->ifp->if_flags |= PP_CISCO;
} else if (! strcmp ("fr", (char*)data) && PP_FR) {
#if PP_FR != 0
} else if (! strcmp ("fr", (char*)data)) {
d->ifp->if_flags &= ~(PP_CISCO);
IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE;
#endif
} else if (! strcmp ("ppp", (char*)data)) {
IFP2SP(d->ifp)->pp_flags &= ~PP_FR;
IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE;

View File

@ -1052,9 +1052,11 @@ static int cp_ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struc
IFP2SP(d->ifp)->pp_flags &= ~(PP_FR);
IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE;
d->ifp->if_flags |= PP_CISCO;
} else if (! strcmp ("fr", (char*)data) && PP_FR) {
#if PP_FR != 0
} else if (! strcmp ("fr", (char*)data)) {
d->ifp->if_flags &= ~(PP_CISCO);
IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE;
#endif
} else if (! strcmp ("ppp", (char*)data)) {
IFP2SP(d->ifp)->pp_flags &= ~PP_FR;
IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE;