summaryrefslogtreecommitdiff
path: root/sbin/fsck_ffs/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsck_ffs/setup.c')
-rw-r--r--sbin/fsck_ffs/setup.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c
index 6c5304ee532..68290caaa5c 100644
--- a/sbin/fsck_ffs/setup.c
+++ b/sbin/fsck_ffs/setup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setup.c,v 1.54 2014/05/29 12:02:50 krw Exp $ */
+/* $OpenBSD: setup.c,v 1.55 2014/09/06 04:05:40 guenther Exp $ */
/* $NetBSD: setup.c,v 1.27 1996/09/27 22:45:19 christos Exp $ */
/*
@@ -75,7 +75,8 @@ static const int altsbtry[] = { 32, 64, 128, 144, 160, 192, 256 };
int
setup(char *dev)
{
- long cg, size, asked, i, j, bmapsize;
+ long cg, size, asked, i, j;
+ size_t bmapsize;
struct disklabel *lp;
off_t sizepb;
struct stat statb;
@@ -382,17 +383,16 @@ found:
* allocate and initialize the necessary maps
*/
bmapsize = roundup(howmany(maxfsblock, NBBY), sizeof(int16_t));
- blockmap = calloc((unsigned)bmapsize, sizeof(char));
+ blockmap = calloc(bmapsize, sizeof(char));
if (blockmap == NULL) {
- printf("cannot alloc %u bytes for blockmap\n",
- (unsigned)bmapsize);
+ printf("cannot alloc %zu bytes for blockmap\n", bmapsize);
goto badsblabel;
}
inostathead = calloc((unsigned)(sblock.fs_ncg),
sizeof(struct inostatlist));
if (inostathead == NULL) {
- printf("cannot alloc %u bytes for inostathead\n",
- (unsigned)(sizeof(struct inostatlist) * (sblock.fs_ncg)));
+ printf("cannot alloc %zu bytes for inostathead\n",
+ (unsigned)sblock.fs_ncg * sizeof(struct inostatlist));
goto badsblabel;
}
numdirs = MAX(sblock.fs_cstotal.cs_ndir, 128);