Input: move from strlcpy with unused retval to strscpy
Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220818210022.6865-1-wsa+renesas@sang-engineering.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
24c06e000e
commit
a9f08ad7ad
@@ -155,7 +155,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
|
||||
acecad->input = input_dev;
|
||||
|
||||
if (dev->manufacturer)
|
||||
strlcpy(acecad->name, dev->manufacturer, sizeof(acecad->name));
|
||||
strscpy(acecad->name, dev->manufacturer, sizeof(acecad->name));
|
||||
|
||||
if (dev->product) {
|
||||
if (dev->manufacturer)
|
||||
|
||||
@@ -356,7 +356,7 @@ static int hanwang_probe(struct usb_interface *intf, const struct usb_device_id
|
||||
usb_make_path(dev, hanwang->phys, sizeof(hanwang->phys));
|
||||
strlcat(hanwang->phys, "/input0", sizeof(hanwang->phys));
|
||||
|
||||
strlcpy(hanwang->name, hanwang->features->name, sizeof(hanwang->name));
|
||||
strscpy(hanwang->name, hanwang->features->name, sizeof(hanwang->name));
|
||||
input_dev->name = hanwang->name;
|
||||
input_dev->phys = hanwang->phys;
|
||||
usb_to_input_id(dev, &input_dev->id);
|
||||
|
||||
@@ -319,7 +319,7 @@ static int pegasus_probe(struct usb_interface *intf,
|
||||
pegasus->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
|
||||
if (dev->manufacturer)
|
||||
strlcpy(pegasus->name, dev->manufacturer,
|
||||
strscpy(pegasus->name, dev->manufacturer,
|
||||
sizeof(pegasus->name));
|
||||
|
||||
if (dev->product) {
|
||||
|
||||
Reference in New Issue
Block a user