NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/54813: src/sys/dev/i2c/nxt2k.c: 2 * Suspicious condition
>Number: 54813
>Category: kern
>Synopsis: src/sys/dev/i2c/nxt2k.c: 2 * Suspicious condition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 31 08:35:01 +0000 2019
>Originator: David Binderman
>Release: cvs-20191230
>Organization:
>Environment:
>Description:
1.
src/sys/dev/i2c/nxt2k.c:77:5: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
Source code is
if ((error = iic_acquire_bus(nxt->tag, 0) != 0))
return error;
Maybe better source code
if ((error = iic_acquire_bus(nxt->tag, 0)) != 0)
return error;
2.
src/sys/dev/i2c/nxt2k.c:96:5: style: Suspicious condition (assignment + comparison); Clarify expression with parentheses. [clarifyCondition]
Duplicate.
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index