[gnome-terminal] server: Use cleanup
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] server: Use cleanup
- Date: Sun, 22 Feb 2015 18:51:25 +0000 (UTC)
commit 2793b17fbdeea5d3fddefd0a0303c7310b3d452d
Author: Christian Persch <chpe gnome org>
Date: Sun Feb 22 19:47:15 2015 +0100
server: Use cleanup
src/server.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/server.c b/src/server.c
index 96d1374..9381844 100644
--- a/src/server.c
+++ b/src/server.c
@@ -40,6 +40,7 @@
#include "terminal-gdbus.h"
#include "terminal-i18n.h"
#include "terminal-defines.h"
+#include "terminal-libgsystem.h"
static char *app_id = NULL;
@@ -105,8 +106,7 @@ enum {
int
main (int argc, char **argv)
{
- GApplication *app;
- int exit_code = EXIT_FAILURE;
+ gs_unref_object GApplication *app = NULL;
const char *home_dir, *charset;
GError *error = NULL;
@@ -170,9 +170,5 @@ main (int argc, char **argv)
app = terminal_app_new (app_id);
g_free (app_id);
- exit_code = g_application_run (app, 0, NULL);
-
- g_object_unref (app);
-
- return exit_code;
+ return g_application_run (app, 0, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]