AP_HAL_SITL: Simplify boolean expression

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2021-02-03 11:04:38 -03:00 committed by Andrew Tridgell
parent 9965cbb79a
commit 1038581bcb
1 changed files with 1 additions and 4 deletions

View File

@ -150,10 +150,7 @@ bool I2CDevice::transfer(const uint8_t *send, uint32_t send_len,
_bus.sem.check_owner();
// combined transfer
if (!_transfer(send, send_len, recv, recv_len)) {
return false;
}
return true;
return _transfer(send, send_len, recv, recv_len);
}
bool I2CDevice::_transfer(const uint8_t *send, uint32_t send_len,