Ternary operator has lower priority than OR.

Found by:	PVS-Studio
This commit is contained in:
Gleb Smirnoff 2016-02-17 21:13:33 +00:00
parent 9389e53fd4
commit ec911df8da

View file

@ -162,9 +162,8 @@ ata_serverworks_chipinit(device_t dev)
}
}
else {
pci_write_config(dev, 0x5a,
(pci_read_config(dev, 0x5a, 1) & ~0x40) |
(ctlr->chip->cfg1 == SWKS_100) ? 0x03 : 0x02, 1);
pci_write_config(dev, 0x5a, (pci_read_config(dev, 0x5a, 1) & ~0x40) |
((ctlr->chip->cfg1 == SWKS_100) ? 0x03 : 0x02), 1);
}
ctlr->setmode = ata_serverworks_setmode;
return 0;