> var = action(...); > if (failed(var)) This SmPL specification contains a few further software development challenges.
1. It could be taken into account that a function call and a corresponding check for the return value are not directly next to each other. A SmPL ellipsis could be added there. But I guess that special restrictions will be needed then for a safe “when specification”. 2. The check which should appropriately be performed for a return code depends on the called function. * Each failure predicate could be written as a separate SmPL rule. This approach would result into code duplication to some degree. * I would prefer to keep the selection and data processing for the desired predicate at a single place. But I am unsure so far how good such a variant is supported by the current Coccinelle software. Regards, Markus _______________________________________________ Cocci mailing list Cocci@systeme.lip6.fr https://systeme.lip6.fr/mailman/listinfo/cocci