Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1450900 > unrolled thread

Re: [PATCH] Coccinelle: Script to replace allocate and memcpy with zalloc functions

Started byMichal Marek <mmarek@suse.com>
First post2016-07-26 23:00 +0200
Last post2016-07-26 23:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] Coccinelle: Script to replace allocate and memcpy with  zalloc functions Michal Marek <mmarek@suse.com> - 2016-07-26 23:00 +0200

#1450900 — Re: [PATCH] Coccinelle: Script to replace allocate and memcpy with zalloc functions

FromMichal Marek <mmarek@suse.com>
Date2016-07-26 23:00 +0200
SubjectRe: [PATCH] Coccinelle: Script to replace allocate and memcpy with zalloc functions
Message-ID<rZhCh-6Qe-15@gated-at.bofh.it>
Dne 23.7.2016 v 23:00 Amitoj Kaur Chawla napsal(a):
> This script finds instances of allocate and memcpy which can be
> replaced with a direct call to zalloc equivalent of a function.
> 
> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
> ---
>  scripts/coccinelle/api/zalloc.cocci | 556 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 556 insertions(+)
>  create mode 100644 scripts/coccinelle/api/zalloc.cocci
> 
> diff --git a/scripts/coccinelle/api/zalloc.cocci b/scripts/coccinelle/api/zalloc.cocci
> new file mode 100644
> index 0000000..4f94e43
> --- /dev/null
> +++ b/scripts/coccinelle/api/zalloc.cocci
> @@ -0,0 +1,556 @@
> +/// Prefer zalloc functions instead of using allocate and memcpy.

s/memcpy/memset/ ? The actual spatch names the correct function.

Michal

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web