PVS V564: use of bitwise operators on booleans
Change-Id: I0a0cd7ddba0abaef27700f1ba05bf99bb8c7a400 Reviewed-on: https://review.haiku-os.org/c/1607 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
e081b9cd7e
commit
79d1ca0fa9
@ -273,7 +273,7 @@ send_slave_address(const i2c_bus *bus, int slaveAddress, bool isWrite)
|
||||
status_t status;
|
||||
|
||||
TRACE("%s: 0x%X\n", __func__, slaveAddress);
|
||||
status = send_byte(bus, (slaveAddress & 0xfe) | !isWrite, true);
|
||||
status = send_byte(bus, (slaveAddress & 0xfe) | (isWrite ? 0 : 1), true);
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
|
@ -290,11 +290,11 @@ TabletProtocolHandler::_ReadReport(void *buffer, uint32 *cookie)
|
||||
|
||||
bool inRange = true;
|
||||
if (fRange != NULL && fRange->Extract() == B_OK && fRange->Valid())
|
||||
inRange = fRange->Data() & 1 != 0;
|
||||
inRange = ((fRange->Data() & 1) != 0);
|
||||
|
||||
bool eraser = false;
|
||||
if (fEraser != NULL && fEraser->Extract() == B_OK && fEraser->Valid())
|
||||
eraser = (fEraser->Data() & 1) != 0;
|
||||
eraser = ((fEraser->Data() & 1) != 0);
|
||||
|
||||
fReport.DoneProcessing();
|
||||
TRACE("got tablet report\n");
|
||||
|
@ -542,7 +542,7 @@ lo0bits(ULong *y)
|
||||
if (!(x & 1)) {
|
||||
k++;
|
||||
x >>= 1;
|
||||
if (!x & 1)
|
||||
if (!(x & 1))
|
||||
return 32;
|
||||
}
|
||||
*y = x;
|
||||
|
Loading…
Reference in New Issue
Block a user