mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
SUNRPC: 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: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
384edeb46f
commit
15bcdc92d1
@ -261,7 +261,7 @@ static void xs_format_common_peer_addresses(struct rpc_xprt *xprt)
|
||||
switch (sap->sa_family) {
|
||||
case AF_LOCAL:
|
||||
sun = xs_addr_un(xprt);
|
||||
strlcpy(buf, sun->sun_path, sizeof(buf));
|
||||
strscpy(buf, sun->sun_path, sizeof(buf));
|
||||
xprt->address_strings[RPC_DISPLAY_ADDR] =
|
||||
kstrdup(buf, GFP_KERNEL);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user