summaryrefslogtreecommitdiff
path: root/misc/util.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2001-12-16 23:23:37 -0500
committerTheodore Ts'o <tytso@mit.edu>2001-12-16 23:23:37 -0500
commit4ea7bd04390935e1f8b473c8b857e518df2e226b (patch)
tree522193270e7d1c89b7bacc8a7df6486dcccaf82d /misc/util.c
parent8cf93332d180e6929d73cd8c855c3a83d6a6648c (diff)
downloade2fsprogs-4ea7bd04390935e1f8b473c8b857e518df2e226b.tar.gz
Fix various gcc -Wall nits. Fixed a bug in mke2fs where a bogus
error message could be printed on an malloc() failure, and e2image was optimized to avoid needless system calls by using the stashed inode functions.
Diffstat (limited to 'misc/util.c')
-rw-r--r--misc/util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/misc/util.c b/misc/util.c
index 1160e6b8..4bffb43a 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -206,7 +206,7 @@ void parse_journal_opts(const char *opts)
* in the filesystem. For very small filesystems, it is not reasonable to
* have a journal that fills more than half of the filesystem.
*/
-int figure_journal_size(int journal_size, ext2_filsys fs)
+int figure_journal_size(int size, ext2_filsys fs)
{
blk_t j_blocks;
@@ -215,9 +215,8 @@ int figure_journal_size(int journal_size, ext2_filsys fs)
return 0;
}
- if (journal_size >= 0) {
- j_blocks = journal_size * 1024 /
- (fs->blocksize / 1024);
+ if (size >= 0) {
+ j_blocks = size * 1024 / (fs->blocksize / 1024);
if (j_blocks < 1024 || j_blocks > 102400) {
fprintf(stderr, _("\nThe requested journal "
"size is %d blocks; it must be\n"