Skip to content
Commit 95745e9b authored by Navya Sri Nizamkari's avatar Navya Sri Nizamkari Committed by Greg Kroah-Hartman
Browse files

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: default avatarNavya Sri Nizamkari <navyasri.tech@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f40e06f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment