diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-06-28 22:36:29 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-08 04:00:31 +0400 |
commit | b98fe24ca7d0effdd4c47a9f681d9e4f10442827 (patch) | |
tree | a4f2123ff4fbed0c83aad92b862cfefca1d8c584 /drivers/net/ethernet/ti/tlan.c | |
parent | 0a7fdbde691118b0717058b272284e5f4b81f1bb (diff) | |
download | linux-b98fe24ca7d0effdd4c47a9f681d9e4f10442827.tar.xz |
batman-adv: 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:
// <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: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ti/tlan.c')
0 files changed, 0 insertions, 0 deletions