> @@
> function f;
> identifier c;
> @@
> - f(... struct old_thing *c ...);
> + f(... struct new_thing *c ...);

You can't put ... in + code.  Coccinelle doesn't know what you want to
add.

This has the form of a function call.  If you want to make a function
prototype, it needs a type in front of it.  This can be a type
metavariable, declared with type t;

If this is to be a function prototype, the parameter should be surrounded
with commas.  If there is no comma before or after the parameter
declaration, Coccinelle will take care of doing the right thing.

But actually your rule should be:

@@
@@

struct
-   old_thing
+   new_thing

Then it will just change the type whereever it occurs.

julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to