mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
iio: test: Use strscpy() to copy the test description
The buffer length is known to be KUNIT_PARAM_DESC_SIZE Signed-off-by: David Laight <david.laight.linux@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
9fb6c7ba7b
commit
1a6808ca4a
|
|
@ -575,7 +575,7 @@ static const struct rescale_tc_data offset_cases[] = {
|
|||
|
||||
static void case_to_desc(const struct rescale_tc_data *t, char *desc)
|
||||
{
|
||||
strcpy(desc, t->name);
|
||||
strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
|
||||
}
|
||||
|
||||
KUNIT_ARRAY_PARAM(iio_rescale_scale, scale_cases, case_to_desc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user