[spice-gtk v1 3/4] gtk-session: remove single goto usage

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

 



From: Victor Toso <me@xxxxxxxxxxxxxx>

Returning TRUE here should be fine. Not much error handling around the
label.

Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
---
 src/spice-gtk-session.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index 1615172..bf3c1fb 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -813,8 +813,9 @@ static gboolean clipboard_grab(SpiceMainChannel *main, guint selection,
 
     if (read_only(self) ||
         !s->auto_clipboard_enable ||
-        s->nclip_targets[selection] == 0)
-        goto skip_grab_clipboard;
+        s->nclip_targets[selection] == 0) {
+        return TRUE;
+    }
 
     if (!gtk_clipboard_set_with_owner(cb, targets, i,
                                       clipboard_get, clipboard_clear, G_OBJECT(self))) {
@@ -824,7 +825,6 @@ static gboolean clipboard_grab(SpiceMainChannel *main, guint selection,
     s->clipboard_by_guest[selection] = TRUE;
     s->clip_hasdata[selection] = FALSE;
 
-skip_grab_clipboard:
     return TRUE;
 }
 
-- 
2.19.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]