summaryrefslogtreecommitdiff
path: root/sys/miscfs/fuse
diff options
context:
space:
mode:
authorhelg <helg@cvs.openbsd.org>2018-05-15 11:57:33 +0000
committerhelg <helg@cvs.openbsd.org>2018-05-15 11:57:33 +0000
commitcec6da6b0b5b544938fe192e69be08862e1f398c (patch)
treef1a44417d499f201fc88b30fa85949fea930a9bd /sys/miscfs/fuse
parentfbc5f3ce94d765aeea8caa99a5831ddf76f1900a (diff)
Use memset(3) instead of bzero(3) for consistency and as per POSIX
recommendation.
Diffstat (limited to 'sys/miscfs/fuse')
-rw-r--r--sys/miscfs/fuse/fuse_device.c8
-rw-r--r--sys/miscfs/fuse/fuse_vfsops.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/miscfs/fuse/fuse_device.c b/sys/miscfs/fuse/fuse_device.c
index 5bbde357c98..51953bbacda 100644
--- a/sys/miscfs/fuse/fuse_device.c
+++ b/sys/miscfs/fuse/fuse_device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_device.c,v 1.24 2018/01/22 13:16:48 helg Exp $ */
+/* $OpenBSD: fuse_device.c,v 1.25 2018/05/15 11:57:32 helg Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -101,11 +101,11 @@ fuse_dump_buff(char *buff, int len)
return;
}
- bzero(text, 17);
+ memset(text, 0, 17);
for (i = 0; i < len; i++) {
if (i != 0 && (i % 16) == 0) {
printf(": %s\n", text);
- bzero(text, 17);
+ memset(text, 0, 17);
}
printf("%.2x ", buff[i] & 0xff);
@@ -438,7 +438,7 @@ fuseread(dev_t dev, struct uio *uio, int ioflag)
/* Do not send kernel pointers */
memcpy(&hdr.fh_next, &fbuf->fb_next, sizeof(fbuf->fb_next));
- bzero(&fbuf->fb_next, sizeof(fbuf->fb_next));
+ memset(&fbuf->fb_next, 0, sizeof(fbuf->fb_next));
tmpaddr = fbuf->fb_dat;
fbuf->fb_dat = NULL;
error = uiomove(fbuf, FUSEBUFSIZE, uio);
diff --git a/sys/miscfs/fuse/fuse_vfsops.c b/sys/miscfs/fuse/fuse_vfsops.c
index ac4c7e5f1cf..61396f580e2 100644
--- a/sys/miscfs/fuse/fuse_vfsops.c
+++ b/sys/miscfs/fuse/fuse_vfsops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fuse_vfsops.c,v 1.34 2018/04/27 10:13:37 mpi Exp $ */
+/* $OpenBSD: fuse_vfsops.c,v 1.35 2018/05/15 11:57:32 helg Exp $ */
/*
* Copyright (c) 2012-2013 Sylvestre Gallon <ccna.syl@gmail.com>
*
@@ -109,11 +109,11 @@ fusefs_mount(struct mount *mp, const char *path, void *data,
mp->mnt_flag |= MNT_LOCAL;
vfs_getnewfsid(mp);
- bzero(mp->mnt_stat.f_mntonname, MNAMELEN);
+ memset(mp->mnt_stat.f_mntonname, 0, MNAMELEN);
strlcpy(mp->mnt_stat.f_mntonname, path, MNAMELEN);
- bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
+ memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN);
strlcpy(mp->mnt_stat.f_mntfromname, "fusefs", MNAMELEN);
- bzero(mp->mnt_stat.f_mntfromspec, MNAMELEN);
+ memset(mp->mnt_stat.f_mntfromspec, 0, MNAMELEN);
strlcpy(mp->mnt_stat.f_mntfromspec, "fusefs", MNAMELEN);
fuse_device_set_fmp(fmp, 1);