[haiku-commits] Re: r41165 - haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx

  • From: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 3 Apr 2011 11:02:20 -0500

On Sun, 3 Apr 2011 12:20:13 +0200 (MEST)
"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote:

> kallisti5@xxxxxxxxxxx wrote:
> > Log:
> > simple space style cleanup; fix case of bool; no functional change
> [...]
> > -   } while ((result < 0) && (retries < MAX_USB_IO_RETRIES ) );
> > +   } while ((result < 0) && (retries < MAX_USB_IO_RETRIES));
> [...]
> > -   } while ((result < 0) && (retries < MAX_USB_IO_RETRIES ) );
> > +   } while ((result < 0) && (retries < MAX_USB_IO_RETRIES));
> 
> While you're on the subject: the inner parenthesis are superfluous,
> and should be removed.

I still like them because they make the comparison clearer (at least
to me) in this case, but style is style..  corrected in r41170

> [...]
> > -   if (header[0] & 0xBF ) {
> > +   if (header[0] & 0xBF) {
> 
> While in this case, our coding style demands to add an extra (...) !=
> 0 around the expression, since this construct is problematic due to
> operator precedence, and we've already fixed a ton of those issues in
> our code base.

Nice catch on this one, corrected in r41170.

Thanks!
 -- Alex

Other related posts: