aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-04-01 11:57:59 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-05-03 07:11:11 -0400
commit273946a5c507ff5bce12349143470e8629bbe0a7 (patch)
treec060ab6ab237d8f4f24f80d1242384f71ca51e34
parent69964ea4c7b68c9399f7977aa5b9aa6539a6a98a (diff)
UBIFS: remove douple initialization in change_category()
"heap" is initialized twice. I removed the first one, because it makes Smatch complain that we use "new_cat" as an offset before checking it. This doesn't change how the code works, it's just a cleanup. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r--fs/ubifs/lprops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c
index f8a181e647cc..b5c95a69d95f 100644
--- a/fs/ubifs/lprops.c
+++ b/fs/ubifs/lprops.c
@@ -447,7 +447,7 @@ static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
447 int new_cat = ubifs_categorize_lprops(c, lprops); 447 int new_cat = ubifs_categorize_lprops(c, lprops);
448 448
449 if (old_cat == new_cat) { 449 if (old_cat == new_cat) {
450 struct ubifs_lpt_heap *heap = &c->lpt_heap[new_cat - 1]; 450 struct ubifs_lpt_heap *heap;
451 451
452 /* lprops on a heap now must be moved up or down */ 452 /* lprops on a heap now must be moved up or down */
453 if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT) 453 if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)