On Wed, Sep 28, 2016 at 10:55:33AM +0000, Felipe Franciosi wrote: > Hi Marc, > > > On 27 Sep 2016, at 18:12, Marc-André Lureau <mlur...@redhat.com> wrote: > > > > Hi > > > > ----- Original Message ----- > >> When QIOChannels were introduced in 666a3af9, the feature bits were > >> defined shifted. However, when using them, the code was shifting them > >> again. The incorrect use was consistent until 74b6ce43, where > >> QIO_CHANNEL_FEATURE_LISTEN was defined shifted but tested unshifted. > >> > > > > And by luck, QIO_CHANNEL_FEATURE_LISTEN == (1 << > > QIO_CHANNEL_FEATURE_LISTEN), so it works :) > > Can you elaborate on that? Maybe I'm missing something obvious, but > I'm confused as to how they are equivalent.
They're not equivalent QIO_CHANNEL_FEATURE_LISTEN is (1 << 2) which evaulates to 4 and 4 != (1 << 4). Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|