NetBSD-Bugs archive

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

kern/50817: src/sys/dev/pci/if_age.c:2224: contradictory nested if ?



>Number:         50817
>Category:       kern
>Synopsis:       src/sys/dev/pci/if_age.c:2224: contradictory nested if ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 17 11:00:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160216
>Organization:
>Environment:
>Description:
[src/sys/dev/pci/if_age.c:2224] -> [src/sys/dev/pci/if_age.c:2225]: (warning) Opposite conditions in nested 'if' blocks lead to a dead code block.

Source code is

    if (error != 0) {
        if (!error) {
            bus_dmamap_unload(sc->sc_dmat,
                sc->age_cdata.age_rx_sparemap);
            error = EFBIG;
            printf("%s: too many segments?!\n",
                device_xname(sc->sc_dev));
        }

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index