[epiphany/mcatanzaro/web-extension-autoptr: 13/14] web-extension-main: use g_autoptr
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/web-extension-autoptr: 13/14] web-extension-main: use g_autoptr
- Date: Wed, 27 Feb 2019 20:19:59 +0000 (UTC)
commit c3bef5cf074bad008fd47b1554f7dca3f3e21fd6
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Wed Feb 27 13:58:22 2019 -0600
web-extension-main: use g_autoptr
embed/web-extension/ephy-web-extension-main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension-main.c b/embed/web-extension/ephy-web-extension-main.c
index 3123b6ff7..af4234d1f 100644
--- a/embed/web-extension/ephy-web-extension-main.c
+++ b/embed/web-extension/ephy-web-extension-main.c
@@ -40,7 +40,7 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_exten
const char *adblock_data_dir;
gboolean private_profile;
gboolean browser_mode;
- GError *error = NULL;
+ g_autoptr(GError) error = NULL;
g_variant_get (user_data, "(&sm&s&s&sbb)", &guid, &server_address, &dot_dir, &adblock_data_dir,
&private_profile, &browser_mode);
@@ -49,10 +49,8 @@ webkit_web_extension_initialize_with_user_data (WebKitWebExtension *webkit_exten
return;
}
- if (!ephy_file_helpers_init (dot_dir, 0, &error)) {
+ if (!ephy_file_helpers_init (dot_dir, 0, &error))
g_warning ("Failed to initialize file helpers: %s", error->message);
- g_error_free (error);
- }
ephy_debug_init ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]