On 01/19/2016 06:48 AM, Paolo Bonzini wrote: > > > On 19/01/2016 05:51, John Snow wrote: >> + /* Only RESET is allowed to an ATAPI device while BSY and/or DRQ are >> set. */ >> + if (s->status & (BUSY_STAT|DRQ_STAT)) { >> + if (!(val == WIN_DEVICE_RESET) && (s->drive_kind == IDE_CD)) { > > I was going to complain about Pascal-ish parentheses, but actually I > think there is a bug here; the expression just looks weird. > > Did you mean > > if (!(val == WIN_DEVICE_RESET && s->drive_kind == IDE_CD)) > > or equivalently applying de Morgan's law: > > if (s->drive_kind != IDE_CD || val != WIN_DEVICE_RESET) > > ? > > Paolo > >> + return; >
ugh, yes, I typo'd. Thank you. If you're still up, which do you find more readable? The (!(A && B)) form or the (!A || !B) form?