Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset bfbe16f in mainline


Ignore:
Timestamp:
2011-04-21T19:10:30Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
adddd75
Parents:
e5cebc9
Message:

fix inode_grow():

if size_grow parameter can't be zero

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_inode.c

    re5cebc9 rbfbe16f  
    310310{
    311311        unsigned i;
    312 
    313         if (size_grow == 0)
    314                 return EOK;
    315 
    316312        struct mfs_sb_info *sbi = mnode->instance->sbi;
    317313        struct mfs_ino_info *ino_i = mnode->ino_i;
     
    320316        const uint32_t old_size = ino_i->i_size;
    321317        const uint32_t new_size = old_size + size_grow;
     318
     319        assert(size_grow > 0);
    322320
    323321        /*Compute the number of zones to add to the inode*/
Note: See TracChangeset for help on using the changeset viewer.