Author: pfg
Date: Sun Feb 15 01:34:00 2015
New Revision: 278791
URL: https://svnweb.freebsd.org/changeset/base/278791

Log:
  Reuse value of cursize instead of recalculating.
  
  Reported by:  Clang static checker
  MFC after:    1 week

Modified:
  head/sys/fs/ext2fs/ext2_htree.c

Modified: head/sys/fs/ext2fs/ext2_htree.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_htree.c     Sun Feb 15 01:12:15 2015        
(r278790)
+++ head/sys/fs/ext2fs/ext2_htree.c     Sun Feb 15 01:34:00 2015        
(r278791)
@@ -861,7 +861,7 @@ ext2_htree_add_entry(struct vnode *dvp, 
        ext2_htree_split_dirblock((char *)bp->b_data, newdirblock, blksize,
            fs->e3fs_hash_seed, hash_version, &split_hash, entry);
        cursize = roundup(ip->i_size, blksize);
-       dirsize = roundup(ip->i_size, blksize) + blksize;
+       dirsize = cursize + blksize;
        blknum = dirsize / blksize - 1;
 
        /* Add index entry for the new directory block */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to