hw/i386/intel_iommu.c:902: wrong logical operator ?

Bug #1382477 reported by dcb
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

/home/dcb/qemu/trunk/qemu/hw/i386/intel_iommu.c:902:5: error: logical ‘and’ applied to non-boolean constant [-Werror=logical-op]
     pvtd_as = s->address_spaces[VTD_SID_TO_BUS(source_id)];
     ^

$ fgrep VTD_SID_TO_BUS `find . -name \*.h -print`
./include/hw/i386/intel_iommu.h:#define VTD_SID_TO_BUS(sid) (((sid) >> 8) && 0xff)
$

Sounds to me like

#define VTD_SID_TO_BUS(sid) (((sid) >> 8) & 0xff)

would be better.

Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.