Index: uspace/app/mkminix/mkminix.c
===================================================================
--- uspace/app/mkminix/mkminix.c	(revision e03a733313af9a91dc4594f250ebd661f4b57956)
+++ uspace/app/mkminix/mkminix.c	(revision e80b1de12ee23beb45cbd023915a8d7ac291c63b)
@@ -236,5 +236,5 @@
 	int ino_per_block = 0;
 	int fs_version;
-	aoff64_t tmp;
+	aoff64_t inodes;
 
 	if (opt->fs_magic == MFS_MAGIC_V1) {
@@ -264,11 +264,11 @@
 	/*Round up the number of inodes to fill block size*/
 	if (opt->n_inodes == 0)
-		tmp = opt->dev_nblocks / 3;		
+		inodes = opt->dev_nblocks / 3;		
 	else
-		tmp = opt->n_inodes;
-
-	if (tmp % ino_per_block)
-		tmp = ((tmp / ino_per_block) + 1) * ino_per_block;
-	sb->s_ninodes = tmp > UINT16_MAX ? UINT16_MAX : tmp;
+		inodes = opt->n_inodes;
+
+	if (inodes % ino_per_block)
+		inodes = ((inodes / ino_per_block) + 1) * ino_per_block;
+	sb->s_ninodes = inodes > UINT16_MAX ? UINT16_MAX : inodes;
 
 	/*Compute inode bitmap size in blocks*/
@@ -303,5 +303,5 @@
 	int ino_per_block;
 	int bs;
-	aoff64_t tmp;
+	aoff64_t inodes;
 
 	sb->s_magic = opt->fs_magic;
@@ -309,7 +309,13 @@
 
 	if (opt->n_inodes == 0)
-		tmp = opt->dev_nblocks / 3;		
+		inodes = opt->dev_nblocks / 3;		
 	else
-		tmp = opt->n_inodes;
+		inodes = opt->n_inodes;
+
+	/*Round up the number of inodes to fill block size*/
+	ino_per_block = V3_INODES_PER_BLOCK(bs);
+	if (inodes % ino_per_block)
+		inodes = ((inodes / ino_per_block) + 1) * ino_per_block;
+	sb->s_ninodes = inodes > UINT32_MAX ? UINT32_MAX : inodes;
 
 	/*Compute the number of zones on disk*/
@@ -317,10 +323,4 @@
 			UINT32_MAX : opt->dev_nblocks;
 	sb->s_nzones /= (bs / MFS_MIN_BLOCKSIZE);
-
-	/*Round up the number of inodes to fill block size*/
-	ino_per_block = V3_INODES_PER_BLOCK(bs);
-	if (tmp % ino_per_block)
-		tmp = ((tmp / ino_per_block) + 1) * ino_per_block;
-	sb->s_ninodes = tmp > UINT32_MAX ? UINT32_MAX : tmp;
 
 	/*Compute inode bitmap size in blocks*/
