linux/drivers/media/radio/wl128x
Ezequiel Garcia c84401c200 [media] wl128x: 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 19:03:46 -02:00
..
fmdrv_common.c [media] wl128x: Replace memcpy with struct assignment 2012-12-27 19:03:46 -02:00
fmdrv_common.h [media] wl128x: fmdrv_common: fix signedness bugs 2011-12-30 17:00:56 -02:00
fmdrv_rx.c [media] fmdrv: Don't check if unsigned are below zero 2012-10-28 07:39:04 -02:00
fmdrv_rx.h [media] wl128x: fmdrv_rx: fix signedness bugs 2011-12-30 17:01:38 -02:00
fmdrv_tx.c [media] wl128x: fmdrv_tx: fix signedness bugs 2011-12-30 17:01:52 -02:00
fmdrv_tx.h [media] wl128x: fmdrv_tx: fix signedness bugs 2011-12-30 17:01:52 -02:00
fmdrv_v4l2.c [media] radio drivers: in non-blocking mode return EAGAIN in hwseek 2012-09-26 17:51:41 -03:00
fmdrv_v4l2.h
fmdrv.h [media] fmdrv: better define fmdbg() macro to avoid warnings 2012-10-28 07:38:52 -02:00
Kconfig [media] wl128x: fix build errors when GPIOLIB is not enabled 2012-02-15 12:04:45 -02:00
Makefile [media] drivers:media:radio: wl128x: Kconfig & Makefile for wl128x driver 2011-03-21 20:32:36 -03:00