Skip to content

Commit

Permalink
media: uvc: strncpy -> strscpy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Feb 5, 2021
1 parent c90c103 commit 063b811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/usb/uvc/uvc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 063b811

Please sign in to comment.