mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
w1: sgi: 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. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
This commit is contained in:
committed by
Krzysztof Kozlowski
parent
388f22fe5d
commit
5dfd3c73ff
@@ -93,7 +93,7 @@ static int sgi_w1_probe(struct platform_device *pdev)
|
||||
|
||||
pdata = dev_get_platdata(&pdev->dev);
|
||||
if (pdata) {
|
||||
strlcpy(sdev->dev_id, pdata->dev_id, sizeof(sdev->dev_id));
|
||||
strscpy(sdev->dev_id, pdata->dev_id, sizeof(sdev->dev_id));
|
||||
sdev->bus_master.dev_id = sdev->dev_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user