Julia Lawall 4d682420ce mtd: block2mtd: 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/)

// <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: Julia Lawall <julia@diku.dk>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2010-03-18 15:04:09 +00:00
..
2010-03-18 15:04:09 +00:00
2009-09-04 09:38:14 +01:00
2010-02-26 17:05:26 +00:00
2010-02-26 17:05:26 +00:00
2010-03-08 18:45:06 -08:00
2010-02-26 19:06:50 +00:00
2010-02-26 17:05:26 +00:00
2010-02-26 17:05:26 +00:00
2010-02-26 19:06:50 +00:00
2010-02-26 17:05:26 +00:00