projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
559f64d
)
[media] RedRat3: Improve another size determination in redrat3_reset()
author
Markus Elfring
<
[email protected]
>
Thu, 13 Oct 2016 11:23:22 +0000
(08:23 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Fri, 18 Nov 2016 12:48:22 +0000
(10:48 -0200)
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: Markus Elfring <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/rc/redrat3.c
patch
|
blob
|
history
diff --git
a/drivers/media/rc/redrat3.c
b/drivers/media/rc/redrat3.c
index 5e43766757fd89e9f3449dc2a2879385760e9a6f..342a85d0288727b4e9d8e29a7e8ffbce90c81f5d 100644
(file)
--- a/
drivers/media/rc/redrat3.c
+++ b/
drivers/media/rc/redrat3.c
@@
-536,7
+536,7
@@
static void redrat3_reset(struct redrat3_dev *rr3)
struct device *dev = rr3->dev;
int rc, rxpipe, txpipe;
u8 *val;
-
int len = sizeof(u8
);
+
size_t const len = sizeof(*val
);
rxpipe = usb_rcvctrlpipe(udev, 0);
txpipe = usb_sndctrlpipe(udev, 0);