lkml.org 
[lkml]   [2016]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Cocci] [PATCH v3] Coccinelle: Script to replace allocate and memset with zalloc functions
From
Date
>>>> @vz_combined
>>>> depends on patch && !context && !org && !report@
>>>> type T;
>>>> T* pointer;
>>>> +statement S;
>>>> expression express;
>>>> @@
>>>> pointer =
>>>> - vmalloc
>>>> + vzalloc
>>>> (...);
>>>> if (!d)
>>>> S
>>>> -memset(d, 0, sizeof(
>>>> (
>>>> -T
>>>> |
>>>> -*(express)
>>>> )
>>>> -));
>
> Actually, this is a mess. pointer, d, and express are all supposed to be
> the same thing, as they were in the original rule.
>
> Furthermore, this shows a reason why the original rule was better.

There is a trade-off between several unique SmPL rules and other combined
variants which could eventually work with two SmPL disjunctions.

Regards,
Markus

\
 
 \ /
  Last update: 2016-08-01 15:21    [W:0.065 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site