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

Changeset 44799a0 in mainline


Ignore:
Timestamp:
2011-07-17T12:12:39Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
51db5aeb
Parents:
38224615
Message:

size_shrink can be 0 if file is empty.

File:
1 edited

Legend:

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

    r38224615 r44799a0  
    307307        int r;
    308308
    309         assert(size_shrink > 0);
     309        if (size_shrink == 0) {
     310                /*File is empty*/
     311                return EOK;
     312        }
    310313
    311314        const size_t old_size = ino_i->i_size;
Note: See TracChangeset for help on using the changeset viewer.