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:
Adrien Destugues 2019-07-16 20:40:02 +02:00 committed by waddlesplash
parent e081b9cd7e
commit 79d1ca0fa9
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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");

View File

@ -542,7 +542,7 @@ lo0bits(ULong *y)
if (!(x & 1)) {
k++;
x >>= 1;
if (!x & 1)
if (!(x & 1))
return 32;
}
*y = x;