media: uvc: strncpy -> strscpy

The use of strncpy is discouraged, use strscpy instead.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Hans Verkuil 2021-02-01 09:40:56 +01:00 committed by Mauro Carvalho Chehab
parent c90c103c8d
commit 063b811f34

View file

@ -1553,7 +1553,7 @@ static int uvc_gpio_parse(struct uvc_device *dev)
unit->gpio.bmControls[0] = 1;
unit->get_cur = uvc_gpio_get_cur;
unit->get_info = uvc_gpio_get_info;
strncpy(unit->name, "GPIO", sizeof(unit->name) - 1);
strscpy(unit->name, "GPIO", sizeof(unit->name));
list_add_tail(&unit->list, &dev->entities);