[glib/wip/gapplication] Small cleanup



commit 032c1c499874077ecf0c0e94f679306113ab8f1d
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri May 28 21:12:29 2010 -0400

    Small cleanup
    
    Calling exit in an library is bad enough, calling it twice in the same
    function is just too much :-)

 gio/gunixapplication.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gio/gunixapplication.c b/gio/gunixapplication.c
index 8e15188..77255b2 100644
--- a/gio/gunixapplication.c
+++ b/gio/gunixapplication.c
@@ -379,7 +379,7 @@ _g_application_platform_activate (const char *appid, GVariant *data)
 
   connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
   if (connection == NULL)
-    exit (0);
+    goto done;
 
   dbus_path = application_path_from_appid (appid);
   result = g_dbus_connection_call_sync (connection,
@@ -392,5 +392,7 @@ _g_application_platform_activate (const char *appid, GVariant *data)
   g_free (dbus_path);
   if (result)
     g_variant_unref (result);
+
+ done:
   exit (0);
 }



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