]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: Use blk_t instead of int in ext2fs_allocate_group_table
authorTheodore Ts'o <tytso@mit.edu>
Wed, 22 Jul 2009 06:38:16 +0000 (02:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 22 Jul 2009 06:38:16 +0000 (02:38 -0400)
We are using a signed int to store a block number in
ext2fs_allocate_group_table.  We don't actually do any computation or
comparisons using it, so it shouldn't cause any bugs, but it's
technically incorrect, and it's possible an overly clever compiler
might do something wrong with it.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/alloc_tables.c

index 9b4c05727af4bf27f8d4d9e1afacc36c76b6fc5e..8547ad6e9b5f5908a15aafceb5ff911abaa44bdd 100644 (file)
@@ -178,7 +178,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
         * Allocate the inode table
         */
        if (flexbg_size) {
-               int prev_block = 0;
+               blk_t prev_block = 0;
                if (group && fs->group_desc[group-1].bg_inode_table)
                        prev_block = fs->group_desc[group-1].bg_inode_table;
                group_blk = flexbg_offset(fs, group, prev_block, bmap,