1
0
Fork 0
alistair23-linux/drivers/media/usb/cx231xx
Ezequiel Garcia 3724dde9c8 [media] cx231xx: Replace memcpy with struct assignment
This kind of memcpy() is error-prone. Its replacement with a struct
assignment is prefered because it's type-safe and much easier to read.
Found by coccinelle. Hand patched and reviewed.
Tested by compilation only.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier struct_name;
struct struct_name to;
struct struct_name from;
expression E;
@@
-memcpy(&(to), &(from), E);
+to = from;
// </smpl>

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27 18:44:11 -02:00
..
Kconfig [media] au0828, cx231xx: remove dependency for DVB_CAPTURE_DRIVERS 2012-09-12 08:13:13 -03:00
Makefile
cx231xx-417.c [media] v4l: Convert drivers to use monotonic timestamps 2012-12-21 10:56:43 -02:00
cx231xx-audio.c
cx231xx-avcore.c [media] cx231xx-avcore: get rid of a sophisticated do-nothing code 2012-10-27 18:12:13 -02:00
cx231xx-cards.c [media] cx231xx: Replace memcpy with struct assignment 2012-12-27 18:44:11 -02:00
cx231xx-conf-reg.h
cx231xx-core.c
cx231xx-dif.h
cx231xx-dvb.c
cx231xx-i2c.c [media] cx231xx: get rid of warning: no previous prototype 2012-10-27 18:11:54 -02:00
cx231xx-input.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
cx231xx-pcb-cfg.c
cx231xx-pcb-cfg.h
cx231xx-reg.h
cx231xx-vbi.c [media] v4l: Convert drivers to use monotonic timestamps 2012-12-21 10:56:43 -02:00
cx231xx-vbi.h
cx231xx-video.c [media] cx231xx: Replace memcpy with struct assignment 2012-12-27 18:44:11 -02:00
cx231xx.h [media] cx231xx : Add support for Elgato Video Capture V2 2012-12-27 14:11:53 -02:00