Commit 97f8e625 authored by Wolfram Sang's avatar Wolfram Sang Committed by Chuck Lever
Browse files

lockd: 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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent 72f78ae0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static struct nlm_host *nlm_alloc_host(struct nlm_lookup_host_info *ni,
	host->h_addrbuf    = nsm->sm_addrbuf;
	host->net	   = ni->net;
	host->h_cred	   = get_cred(ni->cred);
	strlcpy(host->nodename, utsname()->nodename, sizeof(host->nodename));
	strscpy(host->nodename, utsname()->nodename, sizeof(host->nodename));

out:
	return host;