[bijiben/wip/sadiq/modernize] main: Port to g_auto*
- From: Mohammed Sadiq <pksadiq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben/wip/sadiq/modernize] main: Port to g_auto*
- Date: Fri, 5 Jan 2018 03:07:37 +0000 (UTC)
commit 266e332f740757b7a97de603c576bf86b13c91cf
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Jan 5 07:34:47 2018 +0530
main: Port to 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]