From a4cd45ee8ec67259b347a5f0f5b4fcbfadd7b6f6 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 26 Dec 2022 19:25:49 +0000 Subject: [PATCH] Replace two (void)copystr(..., NULL) with equivalent (void)strlcpy() calls. ok millert@ --- sys/kern/vfs_subr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 322e6833592..650fe5b61a2 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.317 2022/08/14 01:58:28 jsg Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.318 2022/12/26 19:25:49 miod Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -270,8 +270,8 @@ vfs_rootmountalloc(char *fstypename, char *devname, struct mount **mpp) mp = vfs_mount_alloc(NULLVP, vfsp); mp->mnt_flag |= MNT_RDONLY; mp->mnt_stat.f_mntonname[0] = '/'; - copystr(devname, mp->mnt_stat.f_mntfromname, MNAMELEN, NULL); - copystr(devname, mp->mnt_stat.f_mntfromspec, MNAMELEN, NULL); + strlcpy(mp->mnt_stat.f_mntfromname, devname, MNAMELEN); + strlcpy(mp->mnt_stat.f_mntfromspec, devname, MNAMELEN); *mpp = mp; return (0); } -- 2.20.1