pkarashchenko commented on code in PR #12241: URL: https://github.com/apache/nuttx/pull/12241#discussion_r1582255523
########## boards/arm/stm32/common/src/stm32_bh1750.c: ########## @@ -61,21 +61,22 @@ int board_bh1750_initialize(int devno, int busno) { struct i2c_master_s *i2c; + char devpath[12]; int ret; sninfo("Initializing BH1750FVI!\n"); /* Initialize I2C */ i2c = stm32_i2cbus_initialize(busno); - if (!i2c) { return -ENODEV; } /* Then register the ambient light sensor */ + snprintf(devpath, 12, "/dev/light%d", devno); Review Comment: `12`->`sizeof(devpath)` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org