NetBSD Problem Report #54813

From www@netbsd.org  Tue Dec 31 08:33:51 2019
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D00737A158
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Dec 2019 08:33:50 +0000 (UTC)
Message-Id: <20191231083349.DDFBF7A1D0@mollari.NetBSD.org>
Date: Tue, 31 Dec 2019 08:33:49 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/i2c/nxt2k.c: 2 * Suspicious condition 
X-Send-Pr-Version: www-1.0

>Number:         54813
>Category:       kern
>Synopsis:       src/sys/dev/i2c/nxt2k.c: 2 * Suspicious condition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    thorpej
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 31 08:35:01 +0000 2019
>Closed-Date:    Sat Apr 11 12:52:28 +0000 2020
>Last-Modified:  Sat Apr 11 12:52:28 +0000 2020
>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:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: kern-bug-people->thorpej
Responsible-Changed-By: thorpej@NetBSD.org
Responsible-Changed-When: Tue, 31 Dec 2019 14:26:13 +0000
Responsible-Changed-Why:
Take.


From: "Jason R Thorpe" <thorpej@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/54813 CVS commit: src/sys/dev/i2c
Date: Tue, 31 Dec 2019 14:27:50 +0000

 Module Name:	src
 Committed By:	thorpej
 Date:		Tue Dec 31 14:27:50 UTC 2019

 Modified Files:
 	src/sys/dev/i2c: nxt2k.c

 Log Message:
 Fix mis-placed parentheses.  PR kern/54813.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/nxt2k.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: thorpej@NetBSD.org
State-Changed-When: Tue, 31 Dec 2019 14:38:45 +0000
State-Changed-Why:
Please confirm the issue is fixed with:

$NetBSD: nxt2k.c,v 1.7 2019/12/31 14:27:50 thorpej Exp $


From: David Binderman <dcb314@hotmail.com>
To: "gnats-bugs@gnats.netbsd.org" <gnats-bugs@gnats.netbsd.org>
Cc: 
Subject: Re: kern/54813
Date: Mon, 20 Jan 2020 08:17:52 +0000

 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable



 ________________________________

 Hello there,

 Looks good to me.

 Regards

 David Binderman


 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_
 Content-Type: text/html; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable

 <html>
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
 1">
 <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
 ttom:0;} </style>
 </head>
 <body dir=3D"ltr">
 <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
  color: rgb(0, 0, 0);">
 <br>
 </div>
 <div>
 <div id=3D"appendonsend"></div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
 <div id=3D"divRplyFwdMsg" dir=3D"ltr">
 <div>&nbsp;</div>
 </div>
 <div dir=3D"ltr">
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Hello there,</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Looks good to me.</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Regards</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 David Binderman</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 </div>
 </div>
 </body>
 </html>

 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_--

From: David Binderman <dcb314@hotmail.com>
To: "gnats-bugs@gnats.netbsd.org" <gnats-bugs@gnats.netbsd.org>
Cc: 
Subject: Re: kern/54813
Date: Mon, 20 Jan 2020 08:17:52 +0000

 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable



 ________________________________

 Hello there,

 Looks good to me.

 Regards

 David Binderman


 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_
 Content-Type: text/html; charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable

 <html>
 <head>
 <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
 1">
 <style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
 ttom:0;} </style>
 </head>
 <body dir=3D"ltr">
 <div style=3D"font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;=
  color: rgb(0, 0, 0);">
 <br>
 </div>
 <div>
 <div id=3D"appendonsend"></div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <hr tabindex=3D"-1" style=3D"display:inline-block; width:98%">
 <div id=3D"divRplyFwdMsg" dir=3D"ltr">
 <div>&nbsp;</div>
 </div>
 <div dir=3D"ltr">
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Hello there,</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Looks good to me.</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 Regards</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 David Binderman</div>
 <div style=3D"font-family:Calibri,Helvetica,sans-serif; font-size:12pt; col=
 or:rgb(0,0,0)">
 <br>
 </div>
 </div>
 </div>
 </body>
 </html>

 --_000_DB7PR08MB38011A4F4F3BC45388B4EA769C320DB7PR08MB3801eurp_--

State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sat, 11 Apr 2020 12:52:28 +0000
State-Changed-Why:
feedback ok. thanks for the report!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.