NetBSD-Bugs archive

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

lib/51190: src/lib/libform/type_numeric.c:139]: (style) Redundant condition



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


Source code is

    if ((buf[cur] != '\0') && (buf[cur] == '.')) {

Suggest new code

   if (buf[cur] == '.') {


>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index