Changeset b438804 in mainline
- Timestamp:
- 2011-03-31T16:53:41Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 147c9f6
- Parents:
- bed0356
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkminix/mkminix.c
rbed0356 rb438804 290 290 const long root_dblock = sb->first_data_zone; 291 291 292 root_block = (void *)malloc(sb->block_size);292 root_block = malloc(sb->block_size); 293 293 memset(root_block, 0x00, sb->block_size); 294 294 … … 366 366 const time_t sec = time(NULL); 367 367 368 ino_buf = (struct mfs_inode *)malloc(MFS_BLOCKSIZE);368 ino_buf = malloc(MFS_BLOCKSIZE); 369 369 370 370 if (!ino_buf) … … 398 398 const time_t sec = time(NULL); 399 399 400 ino_buf = (struct mfs2_inode *)malloc(sb->block_size);400 ino_buf = malloc(sb->block_size); 401 401 402 402 if (!ino_buf) … … 504 504 int rc; 505 505 506 sb = (struct mfs_superblock *)malloc(MFS_SUPERBLOCK_SIZE);;506 sb = malloc(MFS_SUPERBLOCK_SIZE);; 507 507 508 508 if (!sb) … … 531 531 int rc; 532 532 533 sb = (struct mfs3_superblock *)malloc(MFS_SUPERBLOCK_SIZE);533 sb = malloc(MFS_SUPERBLOCK_SIZE); 534 534 535 535 if (!sb) … … 562 562 int rc; 563 563 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); 566 566 567 567 if (!ibmap_buf || !zbmap_buf) -
uspace/srv/fs/minixfs/mfs_inode.c
rbed0356 rb438804 50 50 const size_t ino_size = sizeof(struct mfs_inode); 51 51 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); 54 54 55 55 if (!ino || !ino_i) … … 105 105 const size_t ino_size = sizeof(struct mfs2_inode); 106 106 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)); 109 109 110 110 if (!ino || !ino_i) -
uspace/srv/fs/minixfs/mfs_ops.c
rbed0356 rb438804 118 118 119 119 /*Allocate space for generic MFS superblock*/ 120 sbi = (struct mfs_sb_info *) malloc(sizeof(struct mfs_sb_info));120 sbi = malloc(sizeof(*sbi)); 121 121 122 122 if (!sbi) { … … 126 126 127 127 /*Allocate space for filesystem instance*/ 128 instance = (struct mfs_instance *) malloc(sizeof(struct mfs_instance));128 instance = malloc(sizeof(*instance)); 129 129 130 130 if (!instance) { … … 133 133 } 134 134 135 sb = (struct mfs_superblock *)malloc(MFS_SUPERBLOCK_SIZE);135 sb = malloc(MFS_SUPERBLOCK_SIZE); 136 136 137 137 if (!sb) { … … 334 334 const struct mfs_sb_info *sbi = inst->sbi; 335 335 336 node = (fs_node_t *)malloc(sizeof(fs_node_t));336 node = malloc(sizeof(fs_node_t)); 337 337 if (!node) { 338 338 rc = ENOMEM; … … 342 342 fs_node_initialize(node); 343 343 344 mnode = (struct mfs_node *) malloc(sizeof(struct mfs_node));344 mnode = malloc(sizeof(*mnode)); 345 345 if (!mnode) { 346 346 rc = ENOMEM;
Note:
See TracChangeset
for help on using the changeset viewer.