NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-i386/51187: src/sys/arch/i386/i386/multiboot.c:596]: (style) Redundant condition
>Number: 51187
>Category: port-i386
>Synopsis: src/sys/arch/i386/i386/multiboot.c:596]: (style) Redundant condition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-i386-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon May 30 06:20:01 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160529
>Organization:
>Environment:
>Description:
src/sys/arch/i386/i386/multiboot.c:596]: (style) Redundant condition: If 'EXPR == ' '', the comparison 'EXPR != 0' is always true.
Source code is
while (*cl != '\0' && *cl == ' ')
Suggest new code
while (*cl == ' ')
Also in the same file
[src/sys/arch/i386/i386/multiboot.c:228]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'size_t {aka unsigned long}'.
[src/sys/arch/i386/i386/multiboot.c:230]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'size_t {aka unsigned long}'.
Suggest use %lu, not %d.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index