i2c: clarify our usage of the result of the assignment
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
@@ -67,7 +67,8 @@ int
|
|||||||
maa_i2c_read_byte(i2c_t* dev)
|
maa_i2c_read_byte(i2c_t* dev)
|
||||||
{
|
{
|
||||||
int byte;
|
int byte;
|
||||||
if (byte = i2c_smbus_read_byte(dev->fh) < 0) {
|
byte = i2c_smbus_read_byte(dev->fh);
|
||||||
|
if (byte < 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return byte;
|
return byte;
|
||||||
|
|||||||
Reference in New Issue
Block a user