NetBSD-Bugs archive

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

misc/51193: src/sys/arch/landisk/stand/boot/boot2.c:445]: (style) Redundant condition



>Number:         51193
>Category:       misc
>Synopsis:       src/sys/arch/landisk/stand/boot/boot2.c:445]: (style) Redundant condition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon May 30 13:20:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160529
>Organization:
>Environment:
>Description:
src/sys/arch/landisk/stand/boot/boot2.c:445]: (style) Redundant condition: If 'EXPR == ' '', the comparison 'EXPR' is always true.

Source code is

    while (*options && *options == ' ')


Suggest new code

    while (*options == ' ')

Also in the same file

src/sys/arch/landisk/stand/boot/boot2.c:413]: (warning) Obsolete function 'gets' called. It is recommended to use 'fgets' or 'gets_s' instead.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index