From: Ezequiel Garcia Date: Fri, 23 Nov 2012 11:58:05 +0000 (-0300) Subject: UBI: replace memcpy with struct assignment X-Git-Tag: v3.8-rc1~30^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d856c13c11d81dfa545f927db8d31663d45bbc94;p=pandora-kernel.git UBI: 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/) // @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // Signed-off-by: Peter Senna Tschudin Signed-off-by: Ezequiel Garcia Signed-off-by: Artem Bityutskiy --- Reading git-diff-tree failed