summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-05-17 08:00:22 (GMT)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-05-17 08:00:18 (GMT)
commit777a5510093a6d6443351160c6969a0e66f3ba8a (patch)
treed5759bb78129a4817e79b675893728b8d68770d8 /kernel
parentab3c68ee5fd329ba48094d3417fd60e30ea14a87 (diff)
downloadlinux-fsl-qoriq-777a5510093a6d6443351160c6969a0e66f3ba8a.tar.xz
[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>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions