[PATCH v3 17/18] ui: Don't check for mode change after mouse_set error

Markus Armbruster posted 18 patches 3 years, 1 month ago
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Markus Armbruster <armbru@redhat.com>
There is a newer version of this series
[PATCH v3 17/18] ui: Don't check for mode change after mouse_set error
Posted by Markus Armbruster 3 years, 1 month ago
hmp_mouse_set() doesn't bail out when it can't find a mouse.
Harmless, since qemu_input_check_mode_change() should be a no-op then.
Clean it up anyway.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 ui/input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ui/input.c b/ui/input.c
index 7bece94e79..99e52c938e 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -613,6 +613,7 @@ void qemu_mouse_set(int index, Error **err)
 
     if (!found) {
         error_report("Mouse at index '%d' not found", index);
+        return;
     }
 
     qemu_input_check_mode_change();
-- 
2.38.1
Re: [PATCH v3 17/18] ui: Don't check for mode change after mouse_set error
Posted by Daniel P. Berrangé 3 years, 1 month ago
On Tue, Dec 20, 2022 at 10:06:44AM +0100, Markus Armbruster wrote:
> hmp_mouse_set() doesn't bail out when it can't find a mouse.
> Harmless, since qemu_input_check_mode_change() should be a no-op then.
> Clean it up anyway.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  ui/input.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|