summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/vector_user.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2024-02-02 03:55:00 -0800
committerKees Cook <keescook@chromium.org>2024-02-20 20:47:32 -0800
commit1e06589843632afc78d2f8e9735dac3146b97988 (patch)
treec9d4aa07284056b5725ed16ae761ec0921746d8b /arch/um/drivers/vector_user.c
parent8366d124ec937c3815212c00daf00b687eb27969 (diff)
downloadlinux-1e06589843632afc78d2f8e9735dac3146b97988.tar.gz
linux-1e06589843632afc78d2f8e9735dac3146b97988.tar.bz2
linux-1e06589843632afc78d2f8e9735dac3146b97988.zip
um: Convert strscpy() usage to 2-argument style
The ARCH=um build has its own idea about strscpy()'s definition. Adjust the callers to remove the redundant sizeof() arguments ahead of treewide changes, since it needs a manual adjustment for the newly named sized_strscpy() export. Cc: Richard Weinberger <richard@nod.at> Cc: linux-um@lists.infradead.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'arch/um/drivers/vector_user.c')
-rw-r--r--arch/um/drivers/vector_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/drivers/vector_user.c b/arch/um/drivers/vector_user.c
index c719e1ec4645..b16a5e5619d3 100644
--- a/arch/um/drivers/vector_user.c
+++ b/arch/um/drivers/vector_user.c
@@ -141,7 +141,7 @@ static int create_tap_fd(char *iface)
}
memset(&ifr, 0, sizeof(ifr));
ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR;
- strscpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
+ strscpy(ifr.ifr_name, iface);
err = ioctl(fd, TUNSETIFF, (void *) &ifr);
if (err != 0) {
@@ -171,7 +171,7 @@ static int create_raw_fd(char *iface, int flags, int proto)
goto raw_fd_cleanup;
}
memset(&ifr, 0, sizeof(ifr));
- strscpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name));
+ strscpy(ifr.ifr_name, iface);
if (ioctl(fd, SIOCGIFINDEX, (void *) &ifr) < 0) {
err = -errno;
goto raw_fd_cleanup;