Skip to content

Commit

Permalink
UBIFS: remove douple initialization in change_category()
Browse files Browse the repository at this point in the history
"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>
  • Loading branch information
Dan Carpenter authored and Artem Bityutskiy committed May 3, 2012
1 parent 69964ea commit 273946a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ubifs/lprops.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ static void change_category(struct ubifs_info *c, struct ubifs_lprops *lprops)
int new_cat = ubifs_categorize_lprops(c, lprops);

if (old_cat == new_cat) {
struct ubifs_lpt_heap *heap = &c->lpt_heap[new_cat - 1];
struct ubifs_lpt_heap *heap;

/* lprops on a heap now must be moved up or down */
if (new_cat < 1 || new_cat > LPROPS_HEAP_CNT)
Expand Down

0 comments on commit 273946a

Please sign in to comment.