mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
io: Use qio_channel_has_feature() where applicable
Parts of the code have been testing QIOChannel features directly with a logical AND. This patch makes it all consistent by using the qio_channel_has_feature() function to test if a feature is present. Signed-off-by: Felipe Franciosi <felipe@nutanix.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
8fbf661212
commit
e413ae0c04
4 changed files with 6 additions and 5 deletions
|
@ -497,7 +497,7 @@ qio_channel_websock_new_server(QIOChannel *master)
|
|||
ioc = QIO_CHANNEL(wioc);
|
||||
|
||||
wioc->master = master;
|
||||
if (master->features & (1 << QIO_CHANNEL_FEATURE_SHUTDOWN)) {
|
||||
if (qio_channel_has_feature(master, QIO_CHANNEL_FEATURE_SHUTDOWN)) {
|
||||
ioc->features |= (1 << QIO_CHANNEL_FEATURE_SHUTDOWN);
|
||||
}
|
||||
object_ref(OBJECT(master));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue