summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-03-03 09:16:50 -0700
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:12 -0600
commit78c57d0f93495670a12f048dd37cab5b6e11b80c (patch)
tree1f11bd9291fbe814bf75f71c557590f1002094cd /ui
parent705341301bafc5ae3dc947b9217c7a763e52f5b6 (diff)
downloadhqemu-78c57d0f93495670a12f048dd37cab5b6e11b80c.zip
hqemu-78c57d0f93495670a12f048dd37cab5b6e11b80c.tar.gz
qapi: Avoid use of 'data' member of QAPI unions
QAPI code generators currently create a 'void *data' member as part of the anonymous union embedded in the C struct corresponding to a QAPI union. However, directly assigning to this member of the union feels a bit fishy, when we can assign to another member of the struct instead. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Message-Id: <1457021813-10704-9-git-send-email-eblake@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/input.c b/ui/input.c
index 13ee117..b035f86 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -470,7 +470,7 @@ InputEvent *qemu_input_event_new_move(InputEventKind kind,
InputMoveEvent *move = g_new0(InputMoveEvent, 1);
evt->type = kind;
- evt->u.data = move;
+ evt->u.rel = move; /* evt->u.rel is the same as evt->u.abs */
move->axis = axis;
move->value = value;
return evt;
OpenPOWER on IntegriCloud