diff options
author | 2022-08-18 23:00:52 +0200 | |
---|---|---|
committer | 2022-09-19 11:33:53 +0200 | |
commit | a8817cc09d8e6140c8561a81dded7b3f68e15a1b (patch) | |
tree | 2dafb551583bb64b31c5ae175bacc8a32b2f8029 /drivers/nvme/host/fabrics.c | |
parent | nvme: add comment for unaligned "fake" nqn (diff) | |
download | linux-dev-a8817cc09d8e6140c8561a81dded7b3f68e15a1b.tar.xz linux-dev-a8817cc09d8e6140c8561a81dded7b3f68e15a1b.zip |
nvme: 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: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/fabrics.c')
-rw-r--r-- | drivers/nvme/host/fabrics.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 10cc4a814602..61637c1dd722 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -49,7 +49,7 @@ static struct nvmf_host *nvmf_host_add(const char *hostnqn) goto out_unlock; kref_init(&host->ref); - strlcpy(host->nqn, hostnqn, NVMF_NQN_SIZE); + strscpy(host->nqn, hostnqn, NVMF_NQN_SIZE); list_add_tail(&host->list, &nvmf_hosts); out_unlock: |