NetBSD Problem Report #51936

From www@NetBSD.org  Wed Feb  1 19:00:35 2017
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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 576D87A16B
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  1 Feb 2017 19:00:35 +0000 (UTC)
Message-Id: <20170201190034.6FC617A288@mollari.NetBSD.org>
Date: Wed,  1 Feb 2017 19:00:34 +0000 (UTC)
From: dcb314@hotmail.com
Reply-To: dcb314@hotmail.com
To: gnats-bugs@NetBSD.org
Subject: src/sys/dev/isa/gus.c:1030: bad expression ?
X-Send-Pr-Version: www-1.0

>Number:         51936
>Category:       kern
>Synopsis:       src/sys/dev/isa/gus.c:1030: bad expression ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 01 19:05:00 +0000 2017
>Closed-Date:    Sat Feb 04 23:38:13 +0000 2017
>Last-Modified:  Sat Feb 04 23:38:13 +0000 2017
>Originator:     David Binderman
>Release:        cvs-20170201
>Organization:
>Environment:
>Description:
src/sys/dev/isa/gus.c:1030]: (style) Boolean result is used in bitwise operation. Clarify expression with parentheses.

Source code is

    if ((sc->sc_revision >= 10) & !(HAS_CODEC(sc)))

Maybe better code

    if ((sc->sc_revision >= 10) && !(HAS_CODEC(sc)))

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Jonathan A. Kollasch" <jakllsch@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51936 CVS commit: src/sys/dev/isa
Date: Wed, 1 Feb 2017 19:10:33 +0000

 Module Name:	src
 Committed By:	jakllsch
 Date:		Wed Feb  1 19:10:33 UTC 2017

 Modified Files:
 	src/sys/dev/isa: gus.c

 Log Message:
 Use boolean logical and operation on booleans, rather than bitwise and.

 From David Binderman in PR kern/51936.


 To generate a diff of this commit:
 cvs rdiff -u -r1.110 -r1.111 src/sys/dev/isa/gus.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->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 04 Feb 2017 23:38:13 +0000
State-Changed-Why:
committed by jakllsch


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.