diff options
author | Uri Lublin <uril@redhat.com> | 2013-06-27 00:36:34 +0300 |
---|---|---|
committer | Uri Lublin <uril@redhat.com> | 2013-07-16 23:37:25 +0300 |
commit | 2af81e96f54d9deed52231b4c8cea79623b68fab (patch) | |
tree | 5e5a4770001a969c4c127daf9855ea757fcac0cf /server | |
parent | b1330fcd5d49964a724ce0cfca755318f2918a35 (diff) | |
download | spice-2af81e96f54d9deed52231b4c8cea79623b68fab.tar.gz spice-2af81e96f54d9deed52231b4c8cea79623b68fab.tar.xz spice-2af81e96f54d9deed52231b4c8cea79623b68fab.zip |
red_worker: use only DRAWABLE_FOREACH_GLZ_SAFE
Diffstat (limited to 'server')
-rw-r--r-- | server/red_worker.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 0599a0eb..ffd278ce 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -1146,13 +1146,6 @@ static inline uint64_t red_now(void); (link) = ring_next(&(drawable)->pipes, (link)),\ dpi = (link) ? SPICE_CONTAINEROF((link), DrawablePipeItem, base) : NULL) -#define DRAWABLE_FOREACH_GLZ(drawable, link, glz) \ - for (link = (drawable) ? ring_get_head(&drawable->glz_ring) : NULL,\ - glz = (link) ? SPICE_CONTAINEROF((link), RedGlzDrawable, drawable_link) : NULL;\ - (link);\ - (link) = ring_next(&drawable->glz_ring, (link)),\ - glz = (link) ? SPICE_CONTAINEROF((link), RedGlzDrawable, drawable_link) : NULL) - #define DRAWABLE_FOREACH_GLZ_SAFE(drawable, link, next, glz) \ for (link = (drawable) ? ring_get_head(&drawable->glz_ring) : NULL,\ next = (link) ? ring_next(&drawable->glz_ring, link) : NULL,\ @@ -5547,12 +5540,12 @@ static void red_display_destroy_compress_bufs(DisplayChannel *display_channel) static RedGlzDrawable *red_display_get_glz_drawable(DisplayChannelClient *dcc, Drawable *drawable) { RedGlzDrawable *ret; - RingItem *item; + RingItem *item, *next; // TODO - I don't really understand what's going on here, so doing the technical equivalent // now that we have multiple glz_dicts, so the only way to go from dcc to drawable glz is to go // over the glz_ring (unless adding some better data structure then a ring) - DRAWABLE_FOREACH_GLZ(drawable, item, ret) { + DRAWABLE_FOREACH_GLZ_SAFE(drawable, item, next, ret) { if (ret->dcc == dcc) { return ret; } |