NetBSD-Bugs archive

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

kern/51189: src/sys/kern/subr_optstr.c: 2 * Redundant condition:



>Number:         51189
>Category:       kern
>Synopsis:       src/sys/kern/subr_optstr.c: 2 * Redundant condition:
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 30 06:30:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160529
>Organization:
>Environment:
>Description:
src/sys/kern/subr_optstr.c:54]: (style) Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true.

Source code is

    while (*optstr == ' ' && *optstr != '\0')

Suggest new code

     while (*optstr == ' ')

src/sys/kern/subr_optstr.c:76]: (style) Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true.

Source code is

        while (*optstr == ' ' && *optstr != '\0')




>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index