staging: lustre: Use kasprintf.
authorNavya Sri Nizamkari <navyasri.tech@gmail.com>
Sun, 1 Mar 2015 07:38:00 +0000 (13:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Mar 2015 23:13:27 +0000 (15:13 -0800)
commit95745e9b1de24fc682a47080124819e1808c3a17
treec0f827000f738c7b9e5689caabb06ba10995635f
parentf40e06f0b7fe1f7244349b753cc22e67f69cded4
staging: lustre: Use kasprintf.

This patch uses kasprintf as it 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);

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_lib.c
This page took 0.026798 seconds and 5 git commands to generate.