aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
diff options
context:
space:
mode:
authorPedro F. Giffuni <pfg@FreeBSD.org>2015-02-15 01:34:00 +0000
committerPedro F. Giffuni <pfg@FreeBSD.org>2015-02-15 01:34:00 +0000
commit6be4cf22448c500133250b64fd82673c1751e24f (patch)
tree9eea06ce803b1e23329664b451ee844cfc7ee7ff /sys/fs
parentf3ee91ed2b1d2953ba340dc8591bff6c74599706 (diff)
downloadsrc-6be4cf22448c500133250b64fd82673c1751e24f.tar.gz
src-6be4cf22448c500133250b64fd82673c1751e24f.zip
Reuse value of cursize instead of recalculating.
Reported by: Clang static checker MFC after: 1 week
Notes
Notes: svn path=/head/; revision=278791
Diffstat (limited to 'sys/fs')
-rw-r--r--sys/fs/ext2fs/ext2_htree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/ext2fs/ext2_htree.c b/sys/fs/ext2fs/ext2_htree.c
index 70a2f4786e9c..c847aa468e2e 100644
--- a/sys/fs/ext2fs/ext2_htree.c
+++ b/sys/fs/ext2fs/ext2_htree.c
@@ -861,7 +861,7 @@ ext2_htree_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry,
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 */