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

>Number:         11414
>Category:       kern
>Synopsis:       code typo in pcf.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:40:01 PDT 1999
>Closed-Date:    Tue Jun 27 01:20:14 PDT 2000
>Last-Modified:  Tue Jun 27 01:20:49 PDT 2000
>Originator:     Christopher Peterson
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
>Environment:
>Description:

i386/isa/pcf.c (line 365):	& XXX == ; 8:
		if (PCF_GET_S1(pcf) & nBB == 0)

The != operator has higher precedence than the & operator. The above 
code will be compiled as:
		if (PCF_GET_S1(pcf) & (nBB == 0) )

but the author probably intended:
		if ( (PCF_GET_S1(pcf) & nBB) == 0)


>How-To-Repeat:

>Fix:
		if ( (PCF_GET_S1(pcf) & nBB) == 0)


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sat May 1 12:26:48 PDT 1999 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Tue Jun 27 01:20:14 PDT 2000 
State-Changed-Why:  
committed by peter in 1.7 and 1.6.2.1 of sys/i386/isa/pcf.c 

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