svn commit: r228963 - in head/sys/dev: ce cp

Dimitry Andric dim at FreeBSD.org
Thu Dec 29 17:46:25 UTC 2011


Author: dim
Date: Thu Dec 29 17:46:24 2011
New Revision: 228963
URL: http://svn.freebsd.org/changeset/base/228963

Log:
  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

Modified:
  head/sys/dev/ce/if_ce.c
  head/sys/dev/cp/if_cp.c

Modified: head/sys/dev/ce/if_ce.c
==============================================================================
--- head/sys/dev/ce/if_ce.c	Thu Dec 29 16:40:54 2011	(r228962)
+++ head/sys/dev/ce/if_ce.c	Thu Dec 29 17:46:24 2011	(r228963)
@@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u
 			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;

Modified: head/sys/dev/cp/if_cp.c
==============================================================================
--- head/sys/dev/cp/if_cp.c	Thu Dec 29 16:40:54 2011	(r228962)
+++ head/sys/dev/cp/if_cp.c	Thu Dec 29 17:46:24 2011	(r228963)
@@ -1052,9 +1052,11 @@ static int cp_ioctl (struct cdev *dev, u
 			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;


More information about the svn-src-head mailing list