diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-11 18:40:47 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-05-11 18:40:47 +0000 |
commit | 6550503d6d072f8e62e9012db00bb19fc859dbae (patch) | |
tree | 981c7144c378c685e2346450deb74639f02ec7ac /bin/df/ext2fs_df.c | |
parent | 6f2108293d9fc5835f4beb6b69f733f7ed571c09 (diff) |
use strlcpy instead of strncpy+a[len-1]='\0'
Diffstat (limited to 'bin/df/ext2fs_df.c')
-rw-r--r-- | bin/df/ext2fs_df.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/df/ext2fs_df.c b/bin/df/ext2fs_df.c index 60bef0bf5e2..de3612862c6 100644 --- a/bin/df/ext2fs_df.c +++ b/bin/df/ext2fs_df.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ext2fs_df.c,v 1.6 2001/01/28 23:04:55 niklas Exp $ */ +/* $OpenBSD: ext2fs_df.c,v 1.7 2001/05/11 18:40:46 mickey Exp $ */ /* * This file is substantially derived from src/sys/ufs/ext2fs/ext2fs_vfsops.c:e2fs_statfs(). @@ -108,7 +108,6 @@ e2fs_df(rfd, file, sfsp) mntpt = ""; memmove(&sfsp->f_mntonname[0], mntpt, MNAMELEN); memmove(&sfsp->f_mntfromname[0], file, MNAMELEN); - strncpy(sfsp->f_fstypename, MOUNT_EXT2FS, MFSNAMELEN-1); - sfsp->f_fstypename[MFSNAMELEN-1] = '\0'; + strlcpy(sfsp->f_fstypename, MOUNT_EXT2FS, MFSNAMELEN); return (0); } |