Skip to content

Commit

Permalink
ore: signedness bug in _sp2d_min_pg()
Browse files Browse the repository at this point in the history
This for loop doesn't work correctly when "p" is unsigned.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
  • Loading branch information
Dan Carpenter authored and Boaz Harrosh committed Oct 3, 2012
1 parent b8017d2 commit 74b217d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/exofs/ore_raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static unsigned _sp2d_min_pg(struct __stripe_pages_2d *sp2d)

static unsigned _sp2d_max_pg(struct __stripe_pages_2d *sp2d)
{
unsigned p;
int p;

for (p = sp2d->pages_in_unit - 1; p >= 0; --p) {
struct __1_page_stripe *_1ps = &sp2d->_1p_stripes[p];
Expand Down

0 comments on commit 74b217d

Please sign in to comment.