kernel_optimize_test/drivers/iio/imu
Dan Carpenter afc3a57a2e iio:imu: adis16480: show_firmware() buffer too small
Smatch complains that snprintf() returns the number of characters,
not counting the NUL terminator, which *would* have been printed if
there were enough space.  In other words the return value could be more
than sizeof(buf).

In this case, we are printing something like "ff.ff\n" which is at most
6 characters and a NUL so that's not an issue.  I changed snprintf() to
scnprintf() to silence the warning.

But since the buffer doesn't include space for the NUL terminator, we
need to make it bigger or the "\n" will be truncated off.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-By: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-11-30 13:10:16 +00:00
..
adis16480.c iio:imu: adis16480: show_firmware() buffer too small 2012-11-30 13:10:16 +00:00
adis_buffer.c iio:imu:adis: Add paging support 2012-11-20 21:26:37 +00:00
adis_trigger.c
adis.c iio:imu: Add support for the ADIS16480 and similar IMUs 2012-11-20 21:28:51 +00:00
Kconfig iio:imu: Add support for the ADIS16480 and similar IMUs 2012-11-20 21:28:51 +00:00
Makefile iio:imu: Add support for the ADIS16480 and similar IMUs 2012-11-20 21:28:51 +00:00