Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

reiserfs: 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/
Link: https://lkml.kernel.org/r/20220818210153.8095-1-wsa+renesas@sang-engineering.com
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Wolfram Sang and committed by
Andrew Morton
512cb7e4 c97e21fe

+2 -2
+2 -2
fs/reiserfs/procfs.c
··· 411 411 char *s; 412 412 413 413 /* Some block devices use /'s */ 414 - strlcpy(b, sb->s_id, BDEVNAME_SIZE); 414 + strscpy(b, sb->s_id, BDEVNAME_SIZE); 415 415 s = strchr(b, '/'); 416 416 if (s) 417 417 *s = '!'; ··· 441 441 char *s; 442 442 443 443 /* Some block devices use /'s */ 444 - strlcpy(b, sb->s_id, BDEVNAME_SIZE); 444 + strscpy(b, sb->s_id, BDEVNAME_SIZE); 445 445 s = strchr(b, '/'); 446 446 if (s) 447 447 *s = '!';