aboutsummaryrefslogtreecommitdiff
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-01-17 15:10:13 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 22:57:39 +0400
commit2512a026fab8d526e623426a3002599a2de09d16 (patch)
tree72a8c76fda4ee1cacf2a690a6f87139762fb702d /ui/vnc.c
parentf4579e2899df552ea0c1e2f68447fd64b0c38836 (diff)
downloadqemu-2512a026fab8d526e623426a3002599a2de09d16.zip
qemu-2512a026fab8d526e623426a3002599a2de09d16.tar.gz
qemu-2512a026fab8d526e623426a3002599a2de09d16.tar.bz2
ui: rename cursor_{get->ref}, return it
The naming is more conventional in QEMU code, and allows to simplify some code by changing the API design, so it returns the input parameter, instead of void. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 0bdcc3d..8aec5d7 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1032,8 +1032,7 @@ static void vnc_dpy_cursor_define(DisplayChangeListener *dcl,
cursor_unref(vd->cursor);
g_free(vd->cursor_mask);
- vd->cursor = c;
- cursor_get(vd->cursor);
+ vd->cursor = cursor_ref(vd->cursor);
vd->cursor_msize = cursor_get_mono_bpl(c) * c->height;
vd->cursor_mask = g_malloc0(vd->cursor_msize);
cursor_get_mono_mask(c, 0, vd->cursor_mask);