Date: Mon, 22 Nov 2010 14:07:30 -0800 From: Artem Belevich <fbsdlist@src.cx> To: Bruce Cran <bruce@cran.org.uk>, mav@freebsd.org Cc: Alexander Best <arundel@freebsd.org>, freebsd-hackers@freebsd.org Subject: Another small error. Re: Logical vs. bitwise AND in sbin/routed/parms.c Message-ID: <AANLkTi=TZa1pPaMAof0ZJTVG-%2B5VwsQc0bQz%2BDg5-9TF@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
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 <bruce@cran.org.uk> wrote:
> On Mon, 22 Nov 2010 10:48:09 -0800
> Artem Belevich <fbsdlist@src.cx> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=TZa1pPaMAof0ZJTVG-%2B5VwsQc0bQz%2BDg5-9TF>
