From owner-svn-src-all@FreeBSD.ORG Wed Oct 13 17:28:01 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008B010656A3; Wed, 13 Oct 2010 17:28:01 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id A9BA78FC14; Wed, 13 Oct 2010 17:28:00 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 61FB09CB089; Wed, 13 Oct 2010 19:27:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dzJbIx+j0jkR; Wed, 13 Oct 2010 19:27:57 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id C26F79CB4D5; Wed, 13 Oct 2010 19:27:57 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id o9DHRvU6022117; Wed, 13 Oct 2010 19:27:57 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 13 Oct 2010 19:27:57 +0200 From: Roman Divacky To: Rui Paulo Message-ID: <20101013172757.GA21579@freebsd.org> References: <201010131717.o9DHHobD094458@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201010131717.o9DHHobD094458@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r213793 - in head/sys/dev: ce cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Oct 2010 17:28:01 -0000 On Wed, Oct 13, 2010 at 05:17:50PM +0000, Rui Paulo wrote: > 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)) { this is wrong I think... the PP_FR was used for compiling in/out support for something.. see the comment: /* If we don't have Cronyx's sppp version, we don't have fr support via sppp */ #ifndef PP_FR #define PP_FR 0 #endif note that PP_FR is used in some other places as a flag. I guess that by compiling with something like make -DPP_FR=42 some magic would happen. anyway - this does not look like a bug but like an intent, please revert. roman