diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2022-08-18 23:01:22 +0200 |
---|---|---|
committer | Juergen Gross <jgross@suse.com> | 2022-08-25 13:38:07 +0200 |
commit | 6bb79f5b4c84a09cd6bed46ef3e46ef4fc21407d (patch) | |
tree | af20088efb456ea9429678b096009ecf64eb3e6b /drivers/xen/xenbus | |
parent | ab0af755d40f2ea4ef01503e7bebf083f65c9062 (diff) | |
download | linux-6bb79f5b4c84a09cd6bed46ef3e46ef4fc21407d.tar.gz linux-6bb79f5b4c84a09cd6bed46ef3e46ef4fc21407d.tar.bz2 linux-6bb79f5b4c84a09cd6bed46ef3e46ef4fc21407d.zip |
xen: 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>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Link: https://lore.kernel.org/r/20220818210122.7613-1-wsa+renesas@sang-engineering.com
Signed-off-by: Juergen Gross <jgross@suse.com>
Diffstat (limited to 'drivers/xen/xenbus')
-rw-r--r-- | drivers/xen/xenbus/xenbus_probe_frontend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c index 07b010a68fcf..f44d5a64351e 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c @@ -40,7 +40,7 @@ static int frontend_bus_id(char bus_id[XEN_BUS_ID_SIZE], const char *nodename) return -EINVAL; } - strlcpy(bus_id, nodename + 1, XEN_BUS_ID_SIZE); + strscpy(bus_id, nodename + 1, XEN_BUS_ID_SIZE); if (!strchr(bus_id, '/')) { pr_warn("bus_id %s no slash\n", bus_id); return -EINVAL; |