summaryrefslogtreecommitdiff
path: root/libfshelp
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-01 23:55:25 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-12-10 13:45:05 +0100
commit0a4ada8d40fb687a659161ff7e0d1d0994264402 (patch)
tree9bba4a3017b9943de69c112e7e6d8aa3f04afefe /libfshelp
parent51c2bd7408b0a4ee73ecd1928d4c17d4fafb1ec2 (diff)
Replace `bzero' with `memset'
For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
Diffstat (limited to 'libfshelp')
-rw-r--r--libfshelp/fetch-root.c6
-rw-r--r--libfshelp/start-translator.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 45c7dd09..712c11f4 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -121,9 +121,9 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
goto return_error;
}
- bzero (ports, INIT_PORT_MAX * sizeof (mach_port_t));
- bzero (fds, (STDERR_FILENO + 1) * sizeof (mach_port_t));
- bzero (ints, INIT_INT_MAX * sizeof (int));
+ memset (ports, 0, INIT_PORT_MAX * sizeof (mach_port_t));
+ memset (fds, 0, (STDERR_FILENO + 1) * sizeof (mach_port_t));
+ memset (ints, 0, INIT_INT_MAX * sizeof (int));
ports[INIT_PORT_CWDIR] = dotdot;
ports[INIT_PORT_CRDIR] = reauth (getcrdir ());
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c
index ba5418ec..7f0ae70d 100644
--- a/libfshelp/start-translator.c
+++ b/libfshelp/start-translator.c
@@ -38,7 +38,7 @@ fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
ports[i] = MACH_PORT_NULL;
for (i = 0; i < STDERR_FILENO + 1; i++)
fds[i] = MACH_PORT_NULL;
- bzero (ints, INIT_INT_MAX * sizeof (int));
+ memset (ints, 0, INIT_INT_MAX * sizeof(int));
ports[INIT_PORT_CWDIR] = getcwdir ();
ports[INIT_PORT_CRDIR] = getcrdir ();