Skip to content

Commit 07b7b88

Browse files
Wolfram Sanggregkh
authored andcommitted
driver_core: 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: Greg Kroah-Hartman <[email protected]>
1 parent e2691f6 commit 07b7b88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/dd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ static int __init save_async_options(char *buf)
806806
if (strlen(buf) >= ASYNC_DRV_NAMES_MAX_LEN)
807807
pr_warn("Too long list of driver names for 'driver_async_probe'!\n");
808808

809-
strlcpy(async_probe_drv_names, buf, ASYNC_DRV_NAMES_MAX_LEN);
809+
strscpy(async_probe_drv_names, buf, ASYNC_DRV_NAMES_MAX_LEN);
810810
async_probe_default = parse_option_str(async_probe_drv_names, "*");
811811

812812
return 1;

0 commit comments

Comments
 (0)