diff options
author | Eric Blake <eblake@redhat.com> | 2016-03-03 09:16:50 -0700 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:49:12 -0600 |
commit | 78c57d0f93495670a12f048dd37cab5b6e11b80c (patch) | |
tree | 1f11bd9291fbe814bf75f71c557590f1002094cd /ui | |
parent | 705341301bafc5ae3dc947b9217c7a763e52f5b6 (diff) | |
download | hqemu-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |