提交 74b217d0 编写于 作者: D Dan Carpenter 提交者: Boaz Harrosh

ore: signedness bug in _sp2d_min_pg()

This for loop doesn't work correctly when "p" is unsigned.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
上级 b8017d29
...@@ -203,7 +203,7 @@ static unsigned _sp2d_min_pg(struct __stripe_pages_2d *sp2d) ...@@ -203,7 +203,7 @@ static unsigned _sp2d_min_pg(struct __stripe_pages_2d *sp2d)
static unsigned _sp2d_max_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) { for (p = sp2d->pages_in_unit - 1; p >= 0; --p) {
struct __1_page_stripe *_1ps = &sp2d->_1p_stripes[p]; struct __1_page_stripe *_1ps = &sp2d->_1p_stripes[p];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册