Julia Lawall 777a551009 [S390] drivers/s390/char: Use kstrdup
Use kstrdup when the goal of an allocation is copy a string into the
allocated region.  Additionally drop the now unused variable len.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to;
expression flag,E1,E2;
statement S;
@@

-  to = kmalloc(strlen(from) + 1,flag);
+  to = kstrdup(from, flag);
   ... when != \(from = E1 \| to = E1 \)
   if (to==NULL || ...) S
   ... when != \(from = E2 \| to = E2 \)
-  strcpy(to, from);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2010-05-17 10:00:18 +02:00
..
2010-05-17 10:00:15 +02:00
2009-09-11 10:29:49 +02:00
2010-02-09 11:13:56 +01:00
2010-03-24 11:49:53 +01:00
2010-02-09 11:13:56 +01:00
2009-09-11 10:29:49 +02:00
2010-05-17 10:00:15 +02:00