From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 22 22:07:31 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A507C106566B; Mon, 22 Nov 2010 22:07:31 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6F88FC19; Mon, 22 Nov 2010 22:07:30 +0000 (UTC) Received: by vws9 with SMTP id 9so819377vws.13 for ; Mon, 22 Nov 2010 14:07:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=138MEhrvzxlY64PtBWDSSejZVJLroTs+V4Vknx20hRc=; b=HHupLtYZBUXC70pIspQVonErYCp6pyCWt5lCh20ewjFaADouoOpOQ+6JtyLuHAtC+a F4E4+iHmBAe+oZghwRvg5mwjZ5LQhEGt8oUeNnc0LoHrZ28HCUBxHyycL51tkKTM+LPb SzR2lrWXqnekPPnnHjvd33Cpmbly8mkz0z+TA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=hwjTrjxKW/sb+tDx1th4/gQa30I0HvAiDOG0g6kY/ATkSOeecbfPQ3kGl9wWQoJ5iu fpAmoeiL1HEUfCsPrD2mYosBYsvkncX2Ow3YHxnj4cSTp45Jody/tyP6MBsiOJ3uGNI8 A38d9xAdCXd5GlyWViNsbyf8GQqWr60GgZ53k= MIME-Version: 1.0 Received: by 10.229.74.65 with SMTP id t1mr5413336qcj.279.1290463650131; Mon, 22 Nov 2010 14:07:30 -0800 (PST) Sender: artemb@gmail.com Received: by 10.220.177.8 with HTTP; Mon, 22 Nov 2010 14:07:30 -0800 (PST) Date: Mon, 22 Nov 2010 14:07:30 -0800 X-Google-Sender-Auth: obVSGa3O5yShuaz8t5x4PFnQPfM Message-ID: From: Artem Belevich To: Bruce Cran , mav@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Another small error. Re: Logical vs. bitwise AND in sbin/routed/parms.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2010 22:07:31 -0000 While it's not directly related to hunting for '&'/'&&' typos, here's another seemingly wrong place in the code: --- a/sys/dev/ahci/ahci.c +++ b/sys/dev/ahci/ahci.c @@ -852,7 +852,7 @@ ahci_ch_attach(device_t dev) ch->caps = ctlr->caps; ch->caps2 = ctlr->caps2; ch->quirks = ctlr->quirks; - ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1, + ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1; mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), device_get_unit(dev), "pm_level", &ch->pm_level); I did mention it on freebsd-current@ some time back: http://lists.freebsd.org/pipermail/freebsd-current/2009-November/013645.html --Artem On Mon, Nov 22, 2010 at 1:26 PM, Bruce Cran wrote: > On Mon, 22 Nov 2010 10:48:09 -0800 > Artem Belevich wrote: >> hdr.elf.e_ident[EI_OSABI] is not a bitmask and '==' should've been >> used instead. Now ldd.c has two instances of this bug due to >> copy/pasting of orignal code. > > Fixed in r215705. Thanks! > > -- > Bruce Cran > -- --Artem