soft_i2c: Loop iteration variable: Conform to C89

This commit is contained in:
Raman Gopalan 2023-11-26 15:47:06 +05:30 committed by Meco Man
parent 3ea3f3447e
commit 4e656078b6
1 changed files with 2 additions and 1 deletions

View File

@ -221,8 +221,9 @@ int rt_soft_i2c_init(void)
{
int err = RT_EOK;
struct rt_soft_i2c *obj;
int i;
for(int i = 0; i < sizeof(i2c_bus_obj) / sizeof(i2c_bus_obj[0]); i++)
for(i = 0; i < sizeof(i2c_bus_obj) / sizeof(i2c_bus_obj[0]); i++)
{
struct soft_i2c_config *cfg = &i2c_cfg[i];