[Cocci] 0.2.5-rc1

Julia Lawall julia at diku.dk
Fri Dec 17 22:59:02 CET 2010


> I may have miss something in the provided example which was based on of
> your proposal. My only point is to be able to treat independantly of its
> position the expression:
> 	Packet p1, p2;
> like
> 	Packet p1;
> 	Packet p2;
> because the two are syntaxically equivalent.
> 
> The transformation I want to do is the following:
> - Packet p;
> + Packet *p = EXPRESSION
> OTHER DECLARATION
> + if (p == NULL) then exit;
> ...
> + free(p)
> return ...;

Sure.  The OTHER DECLARATION part should just be ...

julia


More information about the Cocci mailing list