summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_htree.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-02-15 01:34:00 +0000
committerpfg <pfg@FreeBSD.org>2015-02-15 01:34:00 +0000
commit03988df8a2081288eb1ff155d732f7999f8d5979 (patch)
tree9eea06ce803b1e23329664b451ee844cfc7ee7ff /sys/fs/ext2fs/ext2_htree.c
parentd2ad05642ab398ae2a65a75962cf4d3ff2fb9d85 (diff)
downloadFreeBSD-src-03988df8a2081288eb1ff155d732f7999f8d5979.zip
FreeBSD-src-03988df8a2081288eb1ff155d732f7999f8d5979.tar.gz
Reuse value of cursize instead of recalculating.
Reported by: Clang static checker MFC after: 1 week
Diffstat (limited to 'sys/fs/ext2fs/ext2_htree.c')
-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 70a2f47..c847aa4 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 */
OpenPOWER on IntegriCloud