Hi, First of all thanks for coccinnelle. This is a really powerful tool.
I'm a complete beginner and I'm trying to use coccinnelle to do a massive patch on a software (suricata, see http://www.openinfosecfoundation.org/). My goal is to replace TYPE p by TYPE *p and to automagically do the needed change in the source. I've almost managed to do it. It is correct for almost all my files. But I encounter the following problem: Fatal error: exception Failure("More that one variable in decl. Have to split to transform.") This is due to the fact that the code contains: TYPE p1, p2; How do I handle this. My cocci file looks like the following: @rule1@ identifier p; identifier func; identifier fdl; @@ func(...) { ... Packet p; <... ( - p.fdl + p->fdl | - &p + p ) ...> } @rule2@ identifier p; identifier func; @@ func(...) { ... - Packet p; + Packet *p = SCMalloc(SIZE_OF_PACKET); + if (p == NULL) + return 0; ... + SCFree(p); return ...; } -- Eric Leblond _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
