From owner-svn-src-head@FreeBSD.ORG Wed Oct 13 20:03:12 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 AF7C2106564A; Wed, 13 Oct 2010 20:03:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7ABA28FC0C; Wed, 13 Oct 2010 20:03:12 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 2348946BA2; Wed, 13 Oct 2010 16:03:12 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0187B8A01D; Wed, 13 Oct 2010 16:03:11 -0400 (EDT) From: John Baldwin To: "Jung-uk Kim" Date: Wed, 13 Oct 2010 15:46:44 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <201010131717.o9DHHobD094458@svn.freebsd.org> <20101013172757.GA21579@freebsd.org> <201010131359.44590.jkim@FreeBSD.org> In-Reply-To: <201010131359.44590.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201010131546.45048.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 13 Oct 2010 16:03:11 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Roman Divacky , src-committers@freebsd.org, Rui Paulo , svn-src-all@freebsd.org Subject: Re: 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 20:03:12 -0000 On Wednesday, October 13, 2010 1:59:42 pm Jung-uk Kim wrote: > On Wednesday 13 October 2010 01:27 pm, Roman Divacky wrote: > > 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. > > I think the attached patch should do. This is certainly more obvious and readable. -- John Baldwin