Changeset d9bbe45 in mainline for uspace/lib/ext4/libext4_superblock.c


Ignore:
Timestamp:
2012-01-22T13:22:56Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fcae007
Parents:
b7e0260
Message:

Refafctorization - principle of locality in variables declaration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ext4/libext4_superblock.c

    rb7e0260 rd9bbe45  
    437437    ext4_superblock_t **superblock)
    438438{
    439         void *data;
    440439        int rc;
    441440
    442         data = malloc(EXT4_SUPERBLOCK_SIZE);
     441        void *data = malloc(EXT4_SUPERBLOCK_SIZE);
    443442        if (data == NULL) {
    444443                return ENOMEM;
     
    463462        int rc;
    464463        uint32_t phys_block_size;
    465         uint64_t first_block;
    466         uint32_t block_count;
    467464
    468465        rc = block_get_bsize(service_id, &phys_block_size);
     
    472469        }
    473470
    474         first_block = EXT4_SUPERBLOCK_OFFSET / phys_block_size;
    475         block_count = EXT4_SUPERBLOCK_SIZE / phys_block_size;
     471        uint64_t first_block = EXT4_SUPERBLOCK_OFFSET / phys_block_size;
     472        uint32_t block_count = EXT4_SUPERBLOCK_SIZE / phys_block_size;
    476473
    477474        if (EXT4_SUPERBLOCK_SIZE % phys_block_size) {
Note: See TracChangeset for help on using the changeset viewer.