From: Olliver Schinagl <[email protected]>

There is a define that indicates the needed value properly, so we should
use that.

Signed-off-by: Olliver Schinagl <[email protected]>
---
 miscutils/i2c_tools.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 5f41a72ec..e0ca9fe41 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -252,7 +252,7 @@ static int32_t i2c_smbus_read_i2c_block_data(int fd, 
uint8_t cmd,
        data.block[0] = len;
 
        err = i2c_smbus_access(fd, I2C_SMBUS_READ, cmd,
-                              len == 32 ? I2C_SMBUS_I2C_BLOCK_BROKEN :
+                                          len == I2C_SMBUS_BLOCK_MAX ? 
I2C_SMBUS_I2C_BLOCK_BROKEN :
                                           I2C_SMBUS_I2C_BLOCK_DATA, &data);
        if (err < 0)
                return err;
-- 
2.51.1.dirty

_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to