summaryrefslogtreecommitdiffstats
path: root/sys/fs
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2015-02-22 01:42:45 +0000
committerpfg <pfg@FreeBSD.org>2015-02-22 01:42:45 +0000
commite68df850918d693b0867ea3747a92ccca0960544 (patch)
tree1584464371f1c02cadcc5ec701298e7bacb0ace4 /sys/fs
parent43c38b5dd3301211d8a6d217b78a916bf0eb525b (diff)
downloadFreeBSD-src-e68df850918d693b0867ea3747a92ccca0960544.zip
FreeBSD-src-e68df850918d693b0867ea3747a92ccca0960544.tar.gz
MFC r278791:
Reuse value of cursize instead of recalculating. Reported by: Clang static checker
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 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