NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-sparc64/50946: src/sys/arch/sparc64/sparc64/compat_16_machdep.c:291]: (style) Suspicious condition
>Number: 50946
>Category: port-sparc64
>Synopsis: src/sys/arch/sparc64/sparc64/compat_16_machdep.c:291]: (style) Suspicious condition
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: port-sparc64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 11 17:10:00 +0000 2016
>Originator: David Binderman
>Release: cvs dated 20160311
>Organization:
>Environment:
>Description:
src/sys/arch/sparc64/sparc64/compat_16_machdep.c:291]: (style) Suspicious condition (assignment + comparison); Clarify expression with parentheses.
Source code is
if ((vaddr_t)scp & 3 || (error = copyin((void *)scp, &sc, sizeof sc) != 0))
Maybe better code
if (((vaddr_t) scp & 3)
|| ((error = copyin((void *)scp, &sc, sizeof sc)) != 0))
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index