提交 53598051 编写于 作者: D Dan Carpenter 提交者: Mauro Carvalho Chehab

[media] it913x-fe: use ARRAY_SIZE() as a cleanup

This code looks suspicious, but it turns out that "nv" is an array of u8
so sizeof() is the same as ARRAY_SIZE().  Using ARRAY_SIZE() is more
readable though.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 3bfb4100
......@@ -199,7 +199,7 @@ static int it913x_init_tuner(struct it913x_fe_state *state)
if (reg < 0)
return -ENODEV;
else if (reg < sizeof(nv))
else if (reg < ARRAY_SIZE(nv))
nv_val = nv[reg];
else
nv_val = 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册