]> git.proxmox.com Git - mirror_qemu.git/commit
ui: Shorten references into InputEvent
authorEric Blake <eblake@redhat.com>
Thu, 3 Mar 2016 16:16:49 +0000 (09:16 -0700)
committerMarkus Armbruster <armbru@redhat.com>
Sat, 5 Mar 2016 09:41:55 +0000 (10:41 +0100)
commitb5a1b443183f56e0b9ad0f72614bdff7ace780d5
tree7fde6bb5891be9df92ff7ec01f1062915eed09d9
parent0399293e5b9e5443b82103fa8e2c97deadef9825
ui: Shorten references into InputEvent

An upcoming patch will alter how simple unions, like InputEvent, are
laid out, which will impact all lines of the form 'evt->u.XXX'
(expanding it to the longer 'evt->u.XXX.data').  For better
legibility in that patch, and less need for line wrapping, it's better
to use a temporary variable to reduce the effect of a layout change to
just the variable initializations, rather than every reference within
an InputEvent.

There was one instance in hid.c:hid_pointer_event() where the code
was referring to evt->u.rel inside the case label where evt->u.abs
is the correct name; thankfully, both members of the union have the
same type, so it happened to work, but it is now cleaner.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1457021813-10704-8-git-send-email-eblake@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hw/char/escc.c
hw/input/hid.c
hw/input/ps2.c
hw/input/virtio-input-hid.c
replay/replay-input.c
ui/input-legacy.c
ui/input.c