OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2542-g9efc255
Gerrit Code Review
gerrit@openafs.org
Thu, 24 May 2012 08:51:50 -0700 (PDT)
The following commit has been merged in the master branch:
commit 9efc255ab8de7ad90c7d599fea7bd1956bfd48c2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 08:36:11 2012 +0100
Use calloc, rather than malloc/memset
Rather than doing
a = malloc(sizeof(me));
memset(a, 0, sizeof(me));
Just use
a = calloc(1, sizeof(me));
This is simpler, shorter, and removes the potential for the size of
the memset not matching the size of the malloc (or the target of the
memset being wrong!)
Where the size is of the form (n * sizeof(me)), we also use
calloc(n, sizeof(me));
Change-Id: Ia0f75665c1031fd2982eee0e1d8c8ebe23d7fbc0
Reviewed-on: http://gerrit.openafs.org/7454
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afsd/afsd.c | 10 +++-------
src/afsd/afsd_kernel.c | 7 ++-----
src/auth/cellconfig.c | 10 +++-------
src/auth/keys.c | 3 +--
src/auth/realms.c | 6 ++----
src/auth/token.c | 4 +---
src/bozo/bnode.c | 6 ++----
src/bozo/cronbnodeops.c | 3 +--
src/bozo/ezbnodeops.c | 3 +--
src/bozo/fsbnodeops.c | 6 ++----
src/bu_utils/fms.c | 3 +--
src/bucoord/commands.c | 32 +++++++++-----------------------
src/bucoord/config.c | 6 ++----
src/bucoord/dsvs.c | 9 +++------
src/bucoord/dump_sched.c | 4 +---
src/bucoord/restore.c | 19 +++++--------------
src/bucoord/status.c | 3 +--
src/bucoord/tape_hosts.c | 3 +--
src/bucoord/vol_sets.c | 7 ++-----
src/budb/db_hash.c | 6 ++----
src/budb/ol_verify.c | 6 ++----
src/budb/procs.c | 10 +++++-----
src/butc/list.c | 4 +---
src/butc/lwps.c | 3 +--
src/butc/tcmain.c | 3 +--
src/butc/tcudbprocs.c | 11 +++--------
src/gtx/frame.c | 6 ++----
src/gtx/keymap.c | 7 +------
src/gtx/textcb.c | 7 +------
src/kauth/rebuild.c | 3 +--
src/libacl/aclprocs.c | 4 +---
src/libadmin/vos/vsprocs.c | 17 ++++-------------
src/libafscp/afscp_callback.c | 8 ++------
src/libafscp/afscp_dir.c | 3 +--
src/libafscp/afscp_server.c | 6 ++----
src/libafscp/afscp_volume.c | 6 ++----
src/lwp/iomgr.c | 3 +--
src/lwp/test/selsubs.c | 3 +--
src/ptserver/db_verify.c | 9 +++------
src/ptserver/ptuser.c | 3 +--
src/ptserver/testpt.c | 15 +++++----------
src/rx/rx_pthread.c | 3 +--
src/rxkad/rxkad_common.c | 3 +--
src/scout/scout.c | 6 ++----
src/sys/pioctl_nt.c | 4 +---
src/tests/fsx.c | 6 ++----
src/tools/dumpscan/directory.c | 3 +--
src/tools/dumpscan/pathname.c | 6 ++----
src/tools/dumpscan/xf_profile.c | 3 +--
src/tools/dumpscan/xfiles.c | 3 +--
src/tools/rxperf/rxperf.c | 3 +--
src/ubik/beacon.c | 6 ++----
src/ubik/disk.c | 8 +++-----
src/usd/usd_file.c | 9 +++------
src/usd/usd_nt.c | 10 +++-------
src/util/readdir_nt.c | 3 +--
src/venus/afsio.c | 9 +++------
src/venus/fstrace.c | 12 ++++--------
src/viced/afsfileprocs.c | 8 ++------
src/vlserver/vldb_check.c | 3 +--
src/vol/nuke.c | 3 +--
src/vol/salvaged.c | 3 +--
src/vol/salvsync-server.c | 4 +---
src/vol/vg_cache.c | 15 ++++-----------
src/vol/vol-salvage.c | 9 +++------
src/vol/volume.c | 6 ++----
src/volser/dumpstuff.c | 3 +--
src/volser/vol_split.c | 7 ++-----
src/volser/volprocs.c | 18 +++++-------------
src/volser/voltrans.c | 3 +--
src/volser/vsprocs.c | 17 ++++-------------
71 files changed, 146 insertions(+), 337 deletions(-)
--
OpenAFS Master Repository