Changeset b438804 in mainline


Ignore:
Timestamp:
2011-03-31T16:53:41Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
147c9f6
Parents:
bed0356
Message:

cstyle

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkminix/mkminix.c

    rbed0356 rb438804  
    290290        const long root_dblock = sb->first_data_zone;
    291291
    292         root_block = (void *) malloc(sb->block_size);
     292        root_block = malloc(sb->block_size);
    293293        memset(root_block, 0x00, sb->block_size);
    294294
     
    366366        const time_t sec = time(NULL);
    367367
    368         ino_buf = (struct mfs_inode *) malloc(MFS_BLOCKSIZE);
     368        ino_buf = malloc(MFS_BLOCKSIZE);
    369369
    370370        if (!ino_buf)
     
    398398        const time_t sec = time(NULL);
    399399
    400         ino_buf = (struct mfs2_inode *) malloc(sb->block_size);
     400        ino_buf = malloc(sb->block_size);
    401401
    402402        if (!ino_buf)
     
    504504        int rc;
    505505
    506         sb = (struct mfs_superblock *) malloc(MFS_SUPERBLOCK_SIZE);;
     506        sb = malloc(MFS_SUPERBLOCK_SIZE);;
    507507
    508508        if (!sb)
     
    531531        int rc;
    532532
    533         sb = (struct mfs3_superblock *) malloc(MFS_SUPERBLOCK_SIZE);
     533        sb = malloc(MFS_SUPERBLOCK_SIZE);
    534534
    535535        if (!sb)
     
    562562        int rc;
    563563
    564         ibmap_buf = (uint32_t *) malloc(ibmap_nblocks * sb->block_size);
    565         zbmap_buf = (uint32_t *) malloc(zbmap_nblocks * sb->block_size);
     564        ibmap_buf = malloc(ibmap_nblocks * sb->block_size);
     565        zbmap_buf = malloc(zbmap_nblocks * sb->block_size);
    566566
    567567        if (!ibmap_buf || !zbmap_buf)
  • uspace/srv/fs/minixfs/mfs_inode.c

    rbed0356 rb438804  
    5050        const size_t ino_size = sizeof(struct mfs_inode);
    5151
    52         ino_i = (struct mfs_ino_info *) malloc(sizeof(struct mfs_ino_info));
    53         ino = (struct mfs_inode *) malloc(ino_size);
     52        ino_i = malloc(sizeof(*ino_i));
     53        ino = malloc(ino_size);
    5454
    5555        if (!ino || !ino_i)
     
    105105        const size_t ino_size = sizeof(struct mfs2_inode);
    106106
    107         ino = (struct mfs2_inode *) malloc(ino_size);
    108         ino_i = (struct mfs_ino_info *) malloc(sizeof(struct mfs_ino_info));
     107        ino = malloc(ino_size);
     108        ino_i = malloc(sizeof(*ino_i));
    109109
    110110        if (!ino || !ino_i)
  • uspace/srv/fs/minixfs/mfs_ops.c

    rbed0356 rb438804  
    118118
    119119        /*Allocate space for generic MFS superblock*/
    120         sbi = (struct mfs_sb_info *) malloc(sizeof(struct mfs_sb_info));
     120        sbi = malloc(sizeof(*sbi));
    121121
    122122        if (!sbi) {
     
    126126
    127127        /*Allocate space for filesystem instance*/
    128         instance = (struct mfs_instance *) malloc(sizeof(struct mfs_instance));
     128        instance = malloc(sizeof(*instance));
    129129
    130130        if (!instance) {
     
    133133        }
    134134
    135         sb = (struct mfs_superblock *) malloc(MFS_SUPERBLOCK_SIZE);
     135        sb = malloc(MFS_SUPERBLOCK_SIZE);
    136136
    137137        if (!sb) {
     
    334334        const struct mfs_sb_info *sbi = inst->sbi;
    335335
    336         node = (fs_node_t *) malloc(sizeof(fs_node_t));
     336        node = malloc(sizeof(fs_node_t));
    337337        if (!node) {
    338338                rc = ENOMEM;
     
    342342        fs_node_initialize(node);
    343343
    344         mnode = (struct mfs_node *) malloc(sizeof(struct mfs_node));
     344        mnode = malloc(sizeof(*mnode));
    345345        if (!mnode) {
    346346                rc = ENOMEM;
Note: See TracChangeset for help on using the changeset viewer.