diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-24 12:13:16 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-05-24 13:31:45 -0700 |
commit | b46fc5f235be04a7f77fb2af1d8cb809889c25c1 (patch) | |
tree | 0bd2e23d52a914a8d79ccc8dd772963ec519f42c /net/netlink | |
parent | 8c3ba8d049247dc06b6dcee1711a11b26647aa44 (diff) |
arch/x86/pci: 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:
(http://coccinelle.lip6.fr/)
// <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: Julia Lawall <julia@diku.dk>
LKML-Reference: <201005241913.o4OJDG3R010871@imap1.linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'net/netlink')
0 files changed, 0 insertions, 0 deletions