[lxc-devel] Patching with Coccinelle?: Deletion of unnecessary checks before specific function calls

SF Markus Elfring elfring at users.sourceforge.net
Mon Oct 20 18:35:59 UTC 2014


Hello,

Several functions perform input parameter validation before their
implementations will try further actions with side effects. Some calling
functions perform similar safety checks.

Functions which release a system resource are occasionally documented in the way
that they tolerate the passing of a null pointer for example.
I do not see a need because of this fact that a function caller repeats a
corresponding check.

Now I would like to propose such a change again.

1. Extension of the test infrastructure for the analysis tool "Coccinelle"
   Semantic patch patterns can help to identify update candidates also in the
LXC source file hierarchy.
   http://coccinelle.lip6.fr/

2. Clarification for some automated update suggestions
   My source code search approach found 19 affected source files with the help
of the software "Coccinelle 1.0.0-rc22" at least which might need another review
and corresponding corrections. Further software development will point even more
potentially open issues out.
   https://github.com/lxc/lxc/issues/158

Regards,
Markus


More information about the lxc-devel mailing list