[Openchrome-devel] [PATCH v2] Properly use bitwise operators in viaProbePinStrapping

Kevin Brace kevinbrace at gmx.com
Tue Jun 21 06:04:52 UTC 2016


Hi Mario,

By the way, the swtich statement thing was already fixed.
 
https://cgit.freedesktop.org/openchrome/xf86-video-openchrome/commit/?id=91b0c7d7d5632eb29f0f72f99c675bf1120c5146
 
For an if statement, it is the expectation that logical operators are going to be used since an if statement is ultimately looking for a true or false.
I used the language correctly in this case, and I do not like wasting time on small issues like this.
OpenChrome still has too many problems in the code.

Regards,
 
Kevin Brace

P.S. Mario, I prefer if you do not keep sending HTML e-mails to OpenChrome mailing lists since the mailing list does not like HTML e-mails.


> Your link isn't really valid in this context. The logical equivalence applies to singular bits, not to a multibit value.0x10 & 0x01 evaluates to 0x00 (== false), while 0x10 && 0x01 evaluates to 0x01 (a true value).Those switch statements will always end up in cases 0 or 1.
> Further, logical operators && and || are lazy, while bitwise operators & and | are not.
>  Regards,Mario.
 


More information about the Openchrome-devel mailing list