diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-09-29 14:29:25 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2016-10-20 08:22:58 +0100 |
commit | 39b7351d2447a099f0cc36f6c42691d47e5e7402 (patch) | |
tree | 8eb487a795b0080209ab14ccf111516673623544 | |
parent | d38ae73683ee7c69d0df3826f4e7206fff8b0e69 (diff) |
Reuse SPICE_N_ELEMENTS macro
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r-- | server/red-worker.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/red-worker.c b/server/red-worker.c index 678856b0..40e58f2f 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -408,11 +408,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]); } |