Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2011 17:46:25 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228963 - in head/sys/dev: ce cp
Message-ID:  <201112291746.pBTHkPNt065999@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112291746.pBTHkPNt065999>