diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-14 07:40:40 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-14 07:40:40 +0000 |
commit | 40c541961125f9186d427b70d1d3e4fe91a1133f (patch) | |
tree | e8d7c1cecbc6a76d70ec06f7b5faf25c25b3d603 | |
parent | fda39df9d12a17ae49d87348b1e9614ab8778576 (diff) |
No need to use calloc gratuitously.
-rw-r--r-- | usr.bin/vmstat/dkstats.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/vmstat/dkstats.c b/usr.bin/vmstat/dkstats.c index eeebc093455..d315ec1af2a 100644 --- a/usr.bin/vmstat/dkstats.c +++ b/usr.bin/vmstat/dkstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dkstats.c,v 1.11 2001/05/14 07:24:12 angelos Exp $ */ +/* $OpenBSD: dkstats.c,v 1.12 2001/05/14 07:40:39 angelos Exp $ */ /* $NetBSD: dkstats.c,v 1.1 1996/05/10 23:19:27 thorpej Exp $ */ /* @@ -158,7 +158,7 @@ dkreadstats() size = dk_ndrive * sizeof(struct disk); mib[0] = CTL_HW; mib[1] = HW_DISKSTATS; - p = calloc(size, sizeof(char)); + p = malloc(size); if (p == NULL) err(1, NULL); if (sysctl(mib, 2, p, &size, NULL, 0) < 0) { @@ -308,7 +308,7 @@ int select; size = 0; if (sysctl(mib, 2, NULL, &size, NULL, 0) < 0) err(1, "can't get hw.disknames"); - disknames = calloc(size, sizeof(char)); + disknames = malloc(size); if (disknames == NULL) err(1, NULL); if (sysctl(mib, 2, disknames, &size, NULL, 0) < 0) |