summaryrefslogtreecommitdiff
path: root/sbin/growfs
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-09-02 23:50:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-09-02 23:50:05 +0000
commit03059e279945b4acbfbc6fc65c70c7d1ba77bb55 (patch)
tree105f0ad8a4c221d0b5cf3ab631a67266dc8fa22b /sbin/growfs
parent34bab3a7fcc73c4a4de55b918cebcbbcc95ff927 (diff)
more malloc(n * m) -> calloc(n, m); from Igor Zinovik
Diffstat (limited to 'sbin/growfs')
-rw-r--r--sbin/growfs/growfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index bb827808e98..096f5cb9533 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: growfs.c,v 1.21 2007/07/07 08:22:55 millert Exp $ */
+/* $OpenBSD: growfs.c,v 1.22 2007/09/02 23:50:03 deraadt Exp $ */
/*
* Copyright (c) 2000 Christoph Herrmann, Thomas-Henning von Kamptz
* Copyright (c) 1980, 1989, 1993 The Regents of the University of California.
@@ -1241,10 +1241,10 @@ updcsloc(time_t utime, int fsi, int fso, unsigned int Nflag)
/*
* Allocate the space for the array of blocks to be relocated.
*/
- bp = (struct gfs_bpp *)malloc(((dupper-odupper) / sblock.fs_frag + 2) *
+ bp = (struct gfs_bpp *)calloc(((dupper-odupper) / sblock.fs_frag + 2),
sizeof(struct gfs_bpp));
if (bp == NULL)
- errx(1, "malloc failed");
+ errx(1, "calloc failed");
memset((char *)bp, 0, ((dupper-odupper) / sblock.fs_frag + 2) *
sizeof(struct gfs_bpp));