From owner-svn-src-head@FreeBSD.ORG Wed Oct 13 17:17:50 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61DD71065673; Wed, 13 Oct 2010 17:17:50 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50D228FC13; Wed, 13 Oct 2010 17:17:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9DHHo4X094461; Wed, 13 Oct 2010 17:17:50 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9DHHobD094458; Wed, 13 Oct 2010 17:17:50 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201010131717.o9DHHobD094458@svn.freebsd.org> From: Rui Paulo Date: Wed, 13 Oct 2010 17:17:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213793 - in head/sys/dev: ce cp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 17:17:50 -0000 Author: rpaulo Date: Wed Oct 13 17:17:50 2010 New Revision: 213793 URL: http://svn.freebsd.org/changeset/base/213793 Log: Don't do a logical AND of the result of strcmp() with a constant. Found with: clang 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 Wed Oct 13 17:16:08 2010 (r213792) +++ head/sys/dev/ce/if_ce.c Wed Oct 13 17:17:50 2010 (r213793) @@ -1313,7 +1313,7 @@ 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) { + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; } else if (! strcmp ("ppp", (char*)data)) { Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Wed Oct 13 17:16:08 2010 (r213792) +++ head/sys/dev/cp/if_cp.c Wed Oct 13 17:17:50 2010 (r213793) @@ -1052,7 +1052,7 @@ 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) { + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; } else if (! strcmp ("ppp", (char*)data)) {