~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to lib/ext2fs/expanddir.c

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2004-09-19 09:43:14 UTC
  • mto: (8.1.1 lenny) (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040919094314-2tafd19i76fhu6ei
Tags: upstream-1.35
ImportĀ upstreamĀ versionĀ 1.35

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
        errcode_t       err;
25
25
};
26
26
 
27
 
static int expand_dir_proc(ext2_filsys          fs,
28
 
                           blk_t                *blocknr,
29
 
                           e2_blkcnt_t          blockcnt,
30
 
                           blk_t                ref_block,
31
 
                           int                  ref_offset,
32
 
                           void                 *priv_data)
 
27
static int expand_dir_proc(ext2_filsys  fs,
 
28
                           blk_t        *blocknr,
 
29
                           e2_blkcnt_t  blockcnt,
 
30
                           blk_t        ref_block EXT2FS_ATTR((unused)),
 
31
                           int          ref_offset EXT2FS_ATTR((unused)),
 
32
                           void         *priv_data)
33
33
{
34
34
        struct expand_dir_struct *es = (struct expand_dir_struct *) priv_data;
35
35
        blk_t   new_blk;
55
55
                es->done = 1;
56
56
                retval = ext2fs_write_dir_block(fs, new_blk, block);
57
57
        } else {
58
 
                retval = ext2fs_get_mem(fs->blocksize, (void **) &block);
 
58
                retval = ext2fs_get_mem(fs->blocksize, &block);
59
59
                if (retval) {
60
60
                        es->err = retval;
61
61
                        return BLOCK_ABORT;
67
67
                es->err = retval;
68
68
                return BLOCK_ABORT;
69
69
        }
70
 
        ext2fs_free_mem((void **) &block);
 
70
        ext2fs_free_mem(&block);
71
71
        *blocknr = new_blk;
72
72
        ext2fs_block_alloc_stats(fs, new_blk, +1);
73
73
        es->newblocks++;