[bijiben] main: Use g_auto*



commit 65df30a4a75f1e300b82bfb97cec7cf2b6c2043d
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Fri Jan 5 07:34:47 2018 +0530

    main: Use g_auto*
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792221

 src/bjb-main.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/bjb-main.c b/src/bjb-main.c
index d46b156..b500354 100644
--- a/src/bjb-main.c
+++ b/src/bjb-main.c
@@ -26,16 +26,12 @@
 int
 main (int argc, char *argv[])
 {
-  BjbApplication *app;
-  int status;
+  g_autoptr(BjbApplication) app = NULL;
 
   bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
   app = bjb_application_new ();
-  status = g_application_run (G_APPLICATION (app), argc, argv);
-  g_object_unref (app);
-
-  return status;
+  return g_application_run (G_APPLICATION (app), argc, argv);
 }


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