On Friday, April 17, 2015 18:34:18 Sven Eckelmann wrote:
From: Himangi Saraogi himangi774@gmail.com
kasprintf combines kmalloc and sprintf, and takes care of the size calculation itself.
The semantic patch that makes this change is as follows:
// <smpl> @@ expression a,flag; expression list args; statement S; @@
a =
- (kmalloc|kzalloc)(...,flag)
- kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...>
- sprintf(a,args);
// </smpl>
Signed-off-by: Himangi Saraogi himangi774@gmail.com Acked-by: Julia Lawall julia.lawall@lip6.fr Signed-off-by: David S. Miller davem@davemloft.net Signed-off-by: Sven Eckelmann sven@narfation.org
sysfs.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-)
Applied in revision aeb0f1d.
Thanks, Marek