From nobody@FreeBSD.ORG Fri Apr 30 15:19:03 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id AB79814EB7; Fri, 30 Apr 1999 15:19:03 -0700 (PDT)
Message-Id: <19990430221903.AB79814EB7@hub.freebsd.org>
Date: Fri, 30 Apr 1999 15:19:03 -0700 (PDT)
From: cpeterso@cs.washington.edu
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: code typo in ad1848.c: the != operator has higher precedence than the & operator. 
X-Send-Pr-Version: www-1.0

>Number:         11410
>Category:       kern
>Synopsis:       code typo in ad1848.c: the != operator has higher precedence than the & operator.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 30 15:20:01 PDT 1999
>Closed-Date:    Tue Jun 27 01:14:17 PDT 2000
>Last-Modified:  Tue Jun 27 01:14:51 PDT 2000
>Originator:     Christopher Peterson
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
>Environment:
>Description:

i386/isa/snd/ad1848.c (line 2039):	& XXX == ; 8:
		if (inb(ad1816_int(d)) & AD1816_INTRPI != 0)

The != operator has higher precedence than the & operator. Therefore 
the above line is actually compiled as:
     if (inb(ad1816_int(d)) & (AD1816_INTRPI != 0) )

but the author probably meant:
     if ( (inb(ad1816_int(d)) & AD1816_INTRPI) != 0)


>How-To-Repeat:

>Fix:

     if ( (inb(ad1816_int(d)) & AD1816_INTRPI) != 0)


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Tue Jun 27 01:14:17 PDT 2000 
State-Changed-Why:  
committed by peter in 1.21 and 1.20.2.1 of snd/ad1848.c 

http://www.freebsd.org/cgi/query-pr.cgi?pr=11410 
>Unformatted:
