[bijiben] app-menu: Use g_auto*
- From: Isaque Galdino de Araujo <igaldino src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [bijiben] app-menu: Use g_auto*
- Date: Sun, 14 Jan 2018 21:09:45 +0000 (UTC)
commit 245789467896805f78eace84c64eec77e1cf6128
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date: Fri Jan 5 08:02:30 2018 +0530
app-menu: Use g_auto*
https://bugzilla.gnome.org/show_bug.cgi?id=792221
src/bjb-app-menu.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/bjb-app-menu.c b/src/bjb-app-menu.c
index 17f99c0..a4f4207 100644
--- a/src/bjb-app-menu.c
+++ b/src/bjb-app-menu.c
@@ -74,9 +74,8 @@ external_activated (GSimpleAction *action,
locations = bjb_import_dialog_get_paths (BJB_IMPORT_DIALOG (dialog));
for (l=locations; l!= NULL; l=l->next)
{
- gchar *uri = g_filename_to_uri (l->data, NULL, NULL);
+ g_autofree gchar *uri = g_filename_to_uri (l->data, NULL, NULL);
bijiben_import_notes (user_data, uri);
- g_free (uri);
}
g_list_free_full (locations, g_free);
@@ -125,7 +124,7 @@ help_activated (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
{
- GError *error = NULL;
+ g_autoptr(GError) error = NULL;
gtk_show_uri_on_window (gtk_application_get_active_window (user_data),
"help:bijiben",
@@ -133,10 +132,7 @@ help_activated (GSimpleAction *action,
&error);
if (error)
- {
g_warning ("%s", error->message);
- g_error_free (error);
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]