diff options
author | 2018-05-15 11:57:32 +0000 | |
---|---|---|
committer | 2018-05-15 11:57:32 +0000 | |
commit | bb72b40bbff2449692c2929ddea410aaf2ca013e (patch) | |
tree | 86404be0cf63a7c1fdf0f8c4c228210f0acfd150 /lib/libfuse | |
parent | Fix format string errors in log messages and update ldapd to use relayd's log.c (diff) | |
download | wireguard-openbsd-bb72b40bbff2449692c2929ddea410aaf2ca013e.tar.xz wireguard-openbsd-bb72b40bbff2449692c2929ddea410aaf2ca013e.zip |
Use memset(3) instead of bzero(3) for consistency and as per POSIX
recommendation.
Diffstat (limited to 'lib/libfuse')
-rw-r--r-- | lib/libfuse/fuse.c | 8 | ||||
-rw-r--r-- | lib/libfuse/fuse_ops.c | 20 | ||||
-rw-r--r-- | lib/libfuse/fuse_opt.c | 4 |
3 files changed, 16 insertions, 16 deletions
diff --git a/lib/libfuse/fuse.c b/lib/libfuse/fuse.c index 73426e54351..065c38c0cb7 100644 --- a/lib/libfuse/fuse.c +++ b/lib/libfuse/fuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.c,v 1.43 2017/12/18 14:20:23 helg Exp $ */ +/* $OpenBSD: fuse.c,v 1.44 2018/05/15 11:57:32 helg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -296,7 +296,7 @@ fuse_mount(const char *dir, struct fuse_args *args) goto bad; } - bzero(&opts, sizeof(opts)); + memset(&opts, 0, sizeof(opts)); if (fuse_opt_parse(args, &opts, fuse_mount_opts, NULL) == -1) goto bad; @@ -312,7 +312,7 @@ fuse_mount(const char *dir, struct fuse_args *args) goto bad; } - bzero(&fargs, sizeof(fargs)); + memset(&fargs, 0, sizeof(fargs)); fargs.fd = fc->fd; fargs.max_read = opts.max_read; @@ -567,7 +567,7 @@ fuse_parse_cmdline(struct fuse_args *args, char **mp, int *mt, int *fg) { struct fuse_core_opts opt; - bzero(&opt, sizeof(opt)); + memset(&opt, 0, sizeof(opt)); if (fuse_opt_parse(args, &opt, fuse_core_opts, ifuse_process_opt) == -1) return (-1); diff --git a/lib/libfuse/fuse_ops.c b/lib/libfuse/fuse_ops.c index 395ce28573b..e322e81aa50 100644 --- a/lib/libfuse/fuse_ops.c +++ b/lib/libfuse/fuse_ops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_ops.c,v 1.28 2017/11/30 11:29:03 helg Exp $ */ +/* $OpenBSD: fuse_ops.c,v 1.29 2018/05/15 11:57:32 helg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * @@ -66,7 +66,7 @@ ifuse_ops_init(struct fuse *f) DPRINTF("Opcode:\tinit\n"); if (f->op.init) { - bzero(&fci, sizeof fci); + memset(&fci, 0, sizeof(fci)); fci.proto_minor = FUSE_MINOR_VERSION; fci.proto_major = FUSE_MAJOR_VERSION; @@ -139,7 +139,7 @@ ifuse_ops_open(struct fuse *f, struct fusebuf *fbuf) CHECK_OPT(open); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.flags = fbuf->fb_io_flags; vn = tree_get(&f->vnode_tree, fbuf->fb_ino); @@ -277,7 +277,7 @@ ifuse_fill_getdir(fuse_dirh_t fd, const char *name, int type, ino_t ino) { struct stat st; - bzero(&st, sizeof(st)); + memset(&st, 0, sizeof(st)); st.st_mode = type << 12; if (ino == 0) st.st_ino = 0xffffffff; @@ -302,7 +302,7 @@ ifuse_ops_readdir(struct fuse *f, struct fusebuf *fbuf) DPRINTF("Offset:\t%llu\n", fbuf->fb_io_off); DPRINTF("Size:\t%lu\n", fbuf->fb_io_len); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.fh = fbuf->fb_io_fd; offset = fbuf->fb_io_off; size = fbuf->fb_io_len; @@ -376,7 +376,7 @@ ifuse_ops_releasedir(struct fuse *f, struct fusebuf *fbuf) DPRINTF("Opcode:\treleasedir\n"); DPRINTF("Inode:\t%llu\n", (unsigned long long)fbuf->fb_ino); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.fh = fbuf->fb_io_fd; ffi.fh_old = ffi.fh; ffi.flags = fbuf->fb_io_flags; @@ -413,7 +413,7 @@ ifuse_ops_release(struct fuse *f, struct fusebuf *fbuf) CHECK_OPT(release); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.fh = fbuf->fb_io_fd; ffi.fh_old = ffi.fh; ffi.flags = fbuf->fb_io_flags; @@ -496,7 +496,7 @@ ifuse_ops_read(struct fuse *f, struct fusebuf *fbuf) CHECK_OPT(read); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.fh = fbuf->fb_io_fd; size = fbuf->fb_io_len; offset = fbuf->fb_io_off; @@ -546,7 +546,7 @@ ifuse_ops_write(struct fuse *f, struct fusebuf *fbuf) CHECK_OPT(write); - bzero(&ffi, sizeof(ffi)); + memset(&ffi, 0, sizeof(ffi)); ffi.fh = fbuf->fb_io_fd; ffi.fh_old = ffi.fh; ffi.writepage = fbuf->fb_io_flags & 1; @@ -721,7 +721,7 @@ ifuse_ops_statfs(struct fuse *f, struct fusebuf *fbuf) struct fuse_vnode *vn; char *realname; - bzero(&fbuf->fb_stat, sizeof(fbuf->fb_stat)); + memset(&fbuf->fb_stat, 0, sizeof(fbuf->fb_stat)); CHECK_OPT(statfs); diff --git a/lib/libfuse/fuse_opt.c b/lib/libfuse/fuse_opt.c index c422d85b079..38bf34a7d15 100644 --- a/lib/libfuse/fuse_opt.c +++ b/lib/libfuse/fuse_opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_opt.c,v 1.25 2017/12/15 16:40:33 jca Exp $ */ +/* $OpenBSD: fuse_opt.c,v 1.26 2018/05/15 11:57:32 helg Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com> * Copyright (c) 2013 Stefan Sperling <stsp@openbsd.org> @@ -275,7 +275,7 @@ fuse_opt_parse(struct fuse_args *args, void *data, if (!args || !args->argc || !args->argv) return (0); - bzero(&outargs, sizeof(outargs)); + memset(&outargs, 0, sizeof(outargs)); fuse_opt_add_arg(&outargs, args->argv[0]); for (i = 1; i < args->argc; i++) { |