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

>Number:         11413
>Category:       kern
>Synopsis:       code typo in pci.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:16:29 PDT 2000
>Last-Modified:  Tue Jun 27 01:18:56 PDT 2000
>Originator:     Christopher Peterson
>Release:        FreeBSD 3.1-RELEASE i386
>Organization:
>Environment:
>Description:

pccard/pcic.c (line 339):	& XXX == ; 8:
			if (mp->flags & MDF_16BITS == 1) {   /* 16bit */

The != operator has higher precedence than the & operator. The above code will be compiled as:
			if (mp->flags & (MDF_16BITS == 1) ) {

but the author probably intended:
			if ( (mp->flags & MDF_16BITS) == 1) {

>How-To-Repeat:

>Fix:
			if ( (mp->flags & MDF_16BITS) == 1) {


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Sat May 1 12:26:07 PDT 1999 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Tue Jun 27 01:16:29 PDT 2000 
State-Changed-Why:  
This typo, albeit in code that is never executed and explicitly 
surounded by #if 0, was nevertheless corrected by peter in 1.72 and 
1.64.2.4 of pccard/pcic.c. 

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