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

Serge Hallyn serge.hallyn at ubuntu.com
Wed Oct 22 14:23:10 UTC 2014


Quoting SF Markus Elfring (elfring at users.sourceforge.net):
> 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/

If it's possible to do this automatically through github that'd be nice.

> 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
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list