NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-atari/50944: src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:129]:(style) Suspicious condition
>Number: 50944
>Category: port-atari
>Synopsis: src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:129]:(style) Suspicious condition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-atari-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 11 17:05:01 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160311
>Organization:
>Environment:
>Description:
src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:129]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.
Source code is
while(c = read(fd, buf, sizeof(buf)) > 0) {
Maybe better code
while ((c = read(fd, buf, sizeof(buf))) > 0) {
Also in the same file:
[src/sys/arch/atari/stand/tostools/file2swp/file2swp.c:84]: (style) Variable 'i' is assigned a value that is never used.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index