On 21/01/2015 10:32, Michael Tokarev wrote:
>> > --- a/hw/audio/sb16.c
>> > +++ b/hw/audio/sb16.c
>> > @@ -999,7 +999,7 @@ static IO_READ_PROTO (dsp_read)
>> > retval = (!s->out_data_len || s->highspeed) ? 0 : 0x80;
>> > if (s->mixer_regs[0x82] & 1) {
>> > ack = 1;
>> > - s->mixer_regs[0x82] &= 1;
>> > + s->mixer_regs[0x82] &= ~1;
> Shouldn't it be ~1u instead?
It's the same since mixer_regs is an array of uint8_t.
I'm not a fan of unsigned suffixes, especially after ~ where most of the
time they're wrong. For example if x is uint64_t:
x &= ~1 is right
x &= ~1ull is right
x &= ~1u also clears bits 32...64
x &= ~1ul also clears bits 32...64 on 32-bit machines
Paolo