From d8d3c7cc672d89b26180a404d6f0b03494160cf5 Mon Sep 17 00:00:00 2001 From: Felipe Franciosi Date: Thu, 29 Sep 2016 08:52:37 -0700 Subject: io: Introduce a qio_channel_set_feature() helper Testing QIOChannel feature support can be done with a helper called qio_channel_has_feature(). Setting feature support, however, was done manually with a logical OR. This patch introduces a new helper called qio_channel_set_feature() and makes use of it where applicable. Signed-off-by: Felipe Franciosi Signed-off-by: Daniel P. Berrange --- io/channel-websock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io/channel-websock.c') diff --git a/io/channel-websock.c b/io/channel-websock.c index 75df03ef29..f45bced82a 100644 --- a/io/channel-websock.c +++ b/io/channel-websock.c @@ -498,7 +498,7 @@ qio_channel_websock_new_server(QIOChannel *master) wioc->master = master; if (qio_channel_has_feature(master, QIO_CHANNEL_FEATURE_SHUTDOWN)) { - ioc->features |= (1 << QIO_CHANNEL_FEATURE_SHUTDOWN); + qio_channel_set_feature(ioc, QIO_CHANNEL_FEATURE_SHUTDOWN); } object_ref(OBJECT(master)); -- cgit v1.2.3