On Thu, May 19, 2011 at 10:47, Nicolas Palix <[email protected]> wrote: [...] > > Is the following code working as you intent ? > > > @@ > expression E; > @@ > > ( > vstralloc(..., NULL) > | > * vstralloc(....,E) > ) >
No... Maybe I use too old a version of Coccinelle for this to work (0.2.5)? I have been given the solution on IRC: @ correct @ position p; @@ vstralloc@p(...,NULL) @ incorrect @ position p != correct.p; @@ vstralloc@p(... + ,NULL ) But then I found a simpler one: @@ expression E != NULL; @@ vstralloc(..., E + , NULL ) OK, it is all starting to sink in. Sloooowly... -- Francis Galiegue, [email protected] "It seems obvious [...] that at least some 'business intelligence' tools invest so much intelligence on the business side that they have nothing left for generating SQL queries" (Stéphane Faroult, in "The Art of SQL", ISBN 0-596-00894-5) _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
