提交 576df632 编写于 作者: M Markus Elfring 提交者: Mauro Carvalho Chehab

[media] RedRat3: Improve another size determination in redrat3_reset()

Replace the specification of a data type by a pointer dereference
as the parameter for the operator "sizeof" to make the corresponding size
determination a bit safer.
Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 559f64d4
...@@ -536,7 +536,7 @@ static void redrat3_reset(struct redrat3_dev *rr3) ...@@ -536,7 +536,7 @@ static void redrat3_reset(struct redrat3_dev *rr3)
struct device *dev = rr3->dev; struct device *dev = rr3->dev;
int rc, rxpipe, txpipe; int rc, rxpipe, txpipe;
u8 *val; u8 *val;
int len = sizeof(u8); size_t const len = sizeof(*val);
rxpipe = usb_rcvctrlpipe(udev, 0); rxpipe = usb_rcvctrlpipe(udev, 0);
txpipe = usb_sndctrlpipe(udev, 0); txpipe = usb_sndctrlpipe(udev, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册