Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- server/red-channel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/server/red-channel.c b/server/red-channel.c index 927e6e9..27c8632 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -331,12 +331,7 @@ void red_channel_register_client_cbs(RedChannel *channel, const ClientCbs *clien int test_capability(const uint32_t *caps, int num_caps, uint32_t cap) { - uint32_t index = cap / 32; - if (num_caps < index + 1) { - return FALSE; - } - - return (caps[index] & (1 << (cap % 32))) != 0; + return VD_AGENT_HAS_CAPABILITY(caps, num_caps, cap); } static void add_capability(uint32_t **caps, int *num_caps, uint32_t cap) -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel