summaryrefslogtreecommitdiff
path: root/sbin/raidctl/raidctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/raidctl/raidctl.c')
-rw-r--r--sbin/raidctl/raidctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/raidctl/raidctl.c b/sbin/raidctl/raidctl.c
index c1cf113bc42..0c0de03da39 100644
--- a/sbin/raidctl/raidctl.c
+++ b/sbin/raidctl/raidctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: raidctl.c,v 1.24 2005/11/14 17:17:11 deraadt Exp $ */
+/* $OpenBSD: raidctl.c,v 1.25 2006/04/02 21:38:56 djm Exp $ */
/* $NetBSD: raidctl.c,v 1.27 2001/07/10 01:30:52 lukem Exp $ */
/*-
@@ -964,8 +964,9 @@ do_meter(fdidpair *fds, int nfd, u_long option)
start_value = 0;
last_eta = 0;
progress_total = progress_completed = 0;
- progressInfo = malloc(nfd * sizeof(RF_ProgressInfo_t));
- memset(&progressInfo[0], 0, nfd * sizeof(RF_ProgressInfo_t));
+ progressInfo = calloc(nfd, sizeof(RF_ProgressInfo_t));
+ if (!progressInfo)
+ err(1, "calloc");
if (gettimeofday(&start_time, NULL))
err(1, "gettimeofday");