> - u8 addr = (msg->addr << 1) | !!(msg->flags & I2C_M_RD); > + u8 addr = (msg->addr << 1) | ((msg->flags & I2C_M_RD) != 0); I prefer !! as an idiom for "bit to bool". Thanks, Wolfram
Attachment:
signature.asc
Description: Digital signature
> - u8 addr = (msg->addr << 1) | !!(msg->flags & I2C_M_RD); > + u8 addr = (msg->addr << 1) | ((msg->flags & I2C_M_RD) != 0); I prefer !! as an idiom for "bit to bool". Thanks, Wolfram
Attachment:
signature.asc
Description: Digital signature