Skip to content

Commit bd8092d

Browse files
Wolfram Sangrafaeljw
authored andcommitted
PM: suspend: 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 <wsa+renesas@sang-engineering.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent b90cb10 commit bd8092d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/suspend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ extern struct suspend_stats suspend_stats;
7575

7676
static inline void dpm_save_failed_dev(const char *name)
7777
{
78-
strlcpy(suspend_stats.failed_devs[suspend_stats.last_failed_dev],
78+
strscpy(suspend_stats.failed_devs[suspend_stats.last_failed_dev],
7979
name,
8080
sizeof(suspend_stats.failed_devs[0]));
8181
suspend_stats.last_failed_dev++;

0 commit comments

Comments
 (0)