From bdc3f149ec134081943fcd626a1c826cccd05171 Mon Sep 17 00:00:00 2001 From: Garrett Regier Date: Wed, 3 Jun 2015 17:16:21 -0700 Subject: [PATCH] binding: Simplify the default transform func https://bugzilla.gnome.org/show_bug.cgi?id=750369 --- gobject/gbinding.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gobject/gbinding.c b/gobject/gbinding.c index f9db9c5cf..01f00a1e1 100644 --- a/gobject/gbinding.c +++ b/gobject/gbinding.c @@ -256,14 +256,14 @@ default_transform (GBinding *binding, G_VALUE_TYPE (value_b))) { g_value_copy (value_a, value_b); - goto done; + return TRUE; } if (g_value_type_transformable (G_VALUE_TYPE (value_a), G_VALUE_TYPE (value_b))) { if (g_value_transform (value_a, value_b)) - goto done; + return TRUE; } g_warning ("%s: Unable to convert a value of type %s to a " @@ -274,10 +274,8 @@ default_transform (GBinding *binding, return FALSE; } - else - g_value_copy (value_a, value_b); -done: + g_value_copy (value_a, value_b); return TRUE; }