NetBSD-Bugs archive

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

kern/51588: src/sys/netinet6/in6_pcb.c: poor logic ?



>Number:         51588
>Category:       kern
>Synopsis:       src/sys/netinet6/in6_pcb.c: poor logic ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 31 12:20:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs-20161031
>Organization:
>Environment:
>Description:
src/sys/netinet6/in6_pcb.c:544] -> [src/sys/netinet6/in6_pcb.c:547]: (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.

Source code is

        if (error != 0) {
            if_put(ifp, &psref);
            curlwp_bindx(bound);
            if (error == 0)
                error = EADDRNOTAVAIL;
            return (error);

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index