mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-26 20:03:54 -06:00
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>
This commit is contained in:
parent
b5a1b44318
commit
10f759079e
2 changed files with 18 additions and 15 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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue