qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 04/17] ui: Shorten references into InputEvent


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH 04/17] ui: Shorten references into InputEvent
Date: Mon, 22 Feb 2016 10:27:06 +0000
User-agent: Mutt/1.5.24 (2015-08-30)

On Fri, Feb 19, 2016 at 05:19:34PM -0700, Eric Blake wrote:
> An upcoming patch will alter how simple unions, like InputEvent,
> are laid out, which will impact all lines of the form 'evt->u.XXX'.
> To minimize the impact of that patch, use a temporary variable to
> reduce the number of lines needing modification when an internal
> reference within InputEvent changes layout.
> 
> 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 <address@hidden>
> ---
>  hw/char/escc.c              | 12 +++++-----
>  hw/input/hid.c              | 36 +++++++++++++++++-------------
>  hw/input/ps2.c              | 27 ++++++++++++++---------
>  hw/input/virtio-input-hid.c | 33 ++++++++++++++++-----------
>  replay/replay-input.c       | 31 ++++++++++++++++----------
>  ui/input-legacy.c           | 26 +++++++++++++---------
>  ui/input.c                  | 54 
> ++++++++++++++++++++++++++-------------------
>  7 files changed, 130 insertions(+), 89 deletions(-)

Reviewed-by: Daniel P. Berrange <address@hidden>

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]