summaryrefslogtreecommitdiff
path: root/sbin/fsck_ext2fs/setup.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:02:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-08-20 22:02:22 +0000
commit999d668af49ba65ca209316fb879a8459e9f850e (patch)
treec9473babdf7ff29e941f183a4a1929fba6c63699 /sbin/fsck_ext2fs/setup.c
parent9e6263b04dc3a7a8ef2f02175efe20fe4ab2097a (diff)
<stdlib.h> is included, so do not need to cast result from
malloc, calloc, realloc* ok krw millert
Diffstat (limited to 'sbin/fsck_ext2fs/setup.c')
-rw-r--r--sbin/fsck_ext2fs/setup.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbin/fsck_ext2fs/setup.c b/sbin/fsck_ext2fs/setup.c
index 7f2404f5f28..32d7e62ef63 100644
--- a/sbin/fsck_ext2fs/setup.c
+++ b/sbin/fsck_ext2fs/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.25 2015/01/16 06:39:57 deraadt Exp $ */
+/* $OpenBSD: setup.c,v 1.26 2015/08/20 22:02:20 deraadt Exp $ */
/* $NetBSD: setup.c,v 1.1 1997/06/11 11:22:01 bouyer Exp $ */
/*
@@ -218,7 +218,7 @@ setup(char *dev)
(unsigned)(maxino + 1));
goto badsblabel;
}
- lncntp = (int16_t *)calloc((unsigned)(maxino + 1), sizeof(int16_t));
+ lncntp = calloc((unsigned)(maxino + 1), sizeof(int16_t));
if (lncntp == NULL) {
printf("cannot alloc %u bytes for lncntp\n",
(unsigned)((maxino + 1) * sizeof(int16_t)));
@@ -229,10 +229,8 @@ setup(char *dev)
}
inplast = 0;
listmax = numdirs + 10;
- inpsort = (struct inoinfo **)calloc((unsigned)listmax,
- sizeof(struct inoinfo *));
- inphead = (struct inoinfo **)calloc((unsigned)numdirs,
- sizeof(struct inoinfo *));
+ inpsort = calloc((unsigned)listmax, sizeof(struct inoinfo *));
+ inphead = calloc((unsigned)numdirs, sizeof(struct inoinfo *));
if (inpsort == NULL || inphead == NULL) {
printf("cannot alloc %u bytes for inphead\n",
(unsigned)(numdirs * sizeof(struct inoinfo *)));