NetBSD-Bugs archive

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

kern/54860: src/sys/dev/pci/if_ixl.c:6393: bad expression



>Number:         54860
>Category:       kern
>Synopsis:       src/sys/dev/pci/if_ixl.c:6393: bad expression
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 14 18:50:00 +0000 2020
>Originator:     David Binderman
>Release:        cvs-20200114
>Organization:
>Environment:
>Description:
src/sys/dev/pci/if_ixl.c:6393:17: warning: Logical disjunction always evaluates to true: val > 100 || val < 180000. [incorrectLogicOperator]

Source code is

        if (100 < val || val < 180000) {
            ixl_param_stats_interval = val;

Maybe better code:

        if (100 < val && val < 180000) {
            ixl_param_stats_interval = val;

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index