From: Julia Lawall Date: Wed, 10 Mar 2010 21:18:13 +0000 (+0100) Subject: driver core: module.c: Use kasprintf X-Git-Tag: v2.6.35-rc1~459^2~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1653268b1b538981df9bb85d637456530938be6c;p=pandora-kernel.git driver core: module.c: Use kasprintf kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed