diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-01 23:55:25 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-10 13:45:05 +0100 |
commit | 0a4ada8d40fb687a659161ff7e0d1d0994264402 (patch) | |
tree | 9bba4a3017b9943de69c112e7e6d8aa3f04afefe /libftpconn | |
parent | 51c2bd7408b0a4ee73ecd1928d4c17d4fafb1ec2 (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 'libftpconn')
-rw-r--r-- | libftpconn/create.c | 2 | ||||
-rw-r--r-- | libftpconn/open.c | 2 | ||||
-rw-r--r-- | libftpconn/unix.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libftpconn/create.c b/libftpconn/create.c index 20a64561..0ffdb49a 100644 --- a/libftpconn/create.c +++ b/libftpconn/create.c @@ -54,7 +54,7 @@ ftp_conn_create (const struct ftp_conn_params *params, new->actv_data_addr = 0; new->cwd = 0; new->type = 0; - bzero (&new->syshooks, sizeof new->syshooks); + memset (&new->syshooks, 0, sizeof new->syshooks); if (new->hooks && new->hooks->init) err = (*new->hooks->init) (new); diff --git a/libftpconn/open.c b/libftpconn/open.c index f52bf4d0..f1a1b854 100644 --- a/libftpconn/open.c +++ b/libftpconn/open.c @@ -189,7 +189,7 @@ ftp_conn_open (struct ftp_conn *conn) close (conn->control); conn->control = -1; } - bzero (&conn->syshooks, sizeof conn->syshooks); + memset (&conn->syshooks, 0, sizeof conn->syshooks); csock = socket (PF_INET, SOCK_STREAM, 0); if (csock < 0) diff --git a/libftpconn/unix.c b/libftpconn/unix.c index 28efefdd..882fee8f 100644 --- a/libftpconn/unix.c +++ b/libftpconn/unix.c @@ -305,7 +305,7 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp if (strncasecmp (p, "total ", 6) == 0) return EAGAIN; - bzero (stat, sizeof *stat); + memset (stat, 0, sizeof *stat); #ifdef FSTYPE_FTP stat->st_fstype = FSTYPE_FTP; @@ -471,7 +471,7 @@ drwxrwxrwt 7 34 archive 512 May 1 14:28 /tmp /* Date. Ick. */ /* Formats: MONTH DAY HH:MM and MONTH DAY YEAR */ - bzero (&tm, sizeof tm); + memset (&tm, 0, sizeof tm); SKIP_WS (); e = p + strcspn (p, " \t\n"); |