mirror of https://gitee.com/openkylin/linux.git
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:
parent
c90c103c8d
commit
063b811f34
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue