5338c16905
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> |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
pvrusb2-audio.c | ||
pvrusb2-audio.h | ||
pvrusb2-context.c | ||
pvrusb2-context.h | ||
pvrusb2-cs53l32a.c | ||
pvrusb2-cs53l32a.h | ||
pvrusb2-ctrl.c | ||
pvrusb2-ctrl.h | ||
pvrusb2-cx2584x-v4l.c | ||
pvrusb2-cx2584x-v4l.h | ||
pvrusb2-debug.h | ||
pvrusb2-debugifc.c | ||
pvrusb2-debugifc.h | ||
pvrusb2-devattr.c | ||
pvrusb2-devattr.h | ||
pvrusb2-dvb.c | ||
pvrusb2-dvb.h | ||
pvrusb2-eeprom.c | ||
pvrusb2-eeprom.h | ||
pvrusb2-encoder.c | ||
pvrusb2-encoder.h | ||
pvrusb2-fx2-cmd.h | ||
pvrusb2-hdw-internal.h | ||
pvrusb2-hdw.c | ||
pvrusb2-hdw.h | ||
pvrusb2-i2c-core.c | ||
pvrusb2-i2c-core.h | ||
pvrusb2-io.c | ||
pvrusb2-io.h | ||
pvrusb2-ioread.c | ||
pvrusb2-ioread.h | ||
pvrusb2-main.c | ||
pvrusb2-std.c | ||
pvrusb2-std.h | ||
pvrusb2-sysfs.c | ||
pvrusb2-sysfs.h | ||
pvrusb2-util.h | ||
pvrusb2-v4l2.c | ||
pvrusb2-v4l2.h | ||
pvrusb2-video-v4l.c | ||
pvrusb2-video-v4l.h | ||
pvrusb2-wm8775.c | ||
pvrusb2-wm8775.h | ||
pvrusb2.h |