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