NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/49272: Patching with Coccinelle?: Deletion of unnecessary checks before specific function calls



>Number:         49272
>Category:       misc
>Synopsis:       Patching with Coccinelle?: Deletion of unnecessary checks before specific function calls
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 10 22:15:00 +0000 2014
>Originator:     Markus Elfring
>Release:        6.1.5
>Organization:
>Environment:
>Description:
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 NetBSD source file hierarchy.
   http://coccinelle.lip6.fr/

2. Clarification for some automated update suggestions
   My source code search approach found 462 functions with the help of the software "Coccinelle 1.0.0-rc22" at least which might need another review and corresponding corrections around NetBSD 6.1.5. Further software development will point even more potentially open issues out.
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index