[haiku-commits] Re: r33781 - in haiku/trunk/src/add-ons/kernel/bus_managers/acpi: . include/platform

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 14:27:33 +0100

Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx> wrote:
> 2009/10/27, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> > philippe.houdoin@xxxxxxxxx wrote:
> >  > +     return info.protection & B_KERNEL_READ_AREA &&
> >  > +             (pointer + length) <= (info.address + info.ram_
> > > size);
> > While the parenthesis around "pointer + length" are superfluous,
> > there
> >  are some parenthesis missing around info.protection & ...
> >  To reduce those errors, please always write (a & b) != 0.
> >  Just another thing I will put into the coding style.
> My bad.
> Also the check for both read and write is not right as well. (It
> actually checks if it's either readable, writable or both atm. Instead
> of it being readable and writable).

So how should it look instead?
Do you mind preparing another patch?

Bye,
   Axel.


Other related posts: