mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 09:44:18 +08:00
5869bb39f8
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 | ||
sn9c102_config.h | ||
sn9c102_core.c | ||
sn9c102_devtable.h | ||
sn9c102_hv7131d.c | ||
sn9c102_hv7131r.c | ||
sn9c102_mi0343.c | ||
sn9c102_mi0360.c | ||
sn9c102_mt9v111.c | ||
sn9c102_ov7630.c | ||
sn9c102_ov7660.c | ||
sn9c102_pas106b.c | ||
sn9c102_pas202bcb.c | ||
sn9c102_sensor.h | ||
sn9c102_tas5110c1b.c | ||
sn9c102_tas5110d.c | ||
sn9c102_tas5130d1b.c | ||
sn9c102.h |