Signed-off-by: Frediano Ziglio <fzig...@redhat.com>
---
 server/red-worker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/red-worker.c b/server/red-worker.c
index 3784261..f3b8c4b 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -407,11 +407,11 @@ static void guest_set_client_capabilities(RedWorker 
*worker)
         red_qxl_set_client_capabilities(worker->qxl, FALSE, caps);
     } else {
         // Take least common denominator
-        for (i = 0 ; i < sizeof(caps_available) / sizeof(caps_available[0]); 
++i) {
+        for (i = 0 ; i < SPICE_N_ELEMENTS(caps_available); ++i) {
             SET_CAP(caps, caps_available[i]);
         }
         FOREACH_CLIENT(worker->display_channel, iter, rcc) {
-            for (i = 0 ; i < sizeof(caps_available) / 
sizeof(caps_available[0]); ++i) {
+            for (i = 0 ; i < SPICE_N_ELEMENTS(caps_available); ++i) {
                 if (!red_channel_client_test_remote_cap(rcc, 
caps_available[i]))
                     CLEAR_CAP(caps, caps_available[i]);
             }
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to