Skip to content

Commit

Permalink
parisc: led: Move from strlcpy with unused retval to strscpy
Browse files Browse the repository at this point in the history
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: Helge Deller <deller@gmx.de>
  • Loading branch information
Wolfram Sang authored and Helge Deller committed Aug 22, 2022
1 parent db4538a commit 4cb2643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/parisc/led.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ int lcd_print( const char *str )
cancel_delayed_work_sync(&led_task);

/* copy display string to buffer for procfs */
strlcpy(lcd_text, str, sizeof(lcd_text));
strscpy(lcd_text, str, sizeof(lcd_text));

/* Set LCD Cursor to 1st character */
gsc_writeb(lcd_info.reset_cmd1, LCD_CMD_REG);
Expand Down

0 comments on commit 4cb2643

Please sign in to comment.