[gnome-initial-setup/wip/pwithnall/misc-fixes: 66/70] timezone: Use g_autoptr() through more of GisTimezonePage
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/pwithnall/misc-fixes: 66/70] timezone: Use g_autoptr() through more of GisTimezonePage
- Date: Fri, 11 Sep 2020 13:29:15 +0000 (UTC)
commit 97f1815f1dedddafa2ee5161abd32b14e6c05d20
Author: Philip Withnall <withnall endlessm com>
Date: Fri Sep 11 12:13:44 2020 +0100
timezone: Use g_autoptr() through more of GisTimezonePage
This should clarify some of the ownership transfers.
This introduces no functional changes.
Signed-off-by: Philip Withnall <withnall endlessm com>
gnome-initial-setup/pages/timezone/gis-timezone-page.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
index 1e0e44f0..0da1d59d 100644
--- a/gnome-initial-setup/pages/timezone/gis-timezone-page.c
+++ b/gnome-initial-setup/pages/timezone/gis-timezone-page.c
@@ -181,13 +181,12 @@ on_geoclue_simple_ready (GObject *source_object,
{
GisTimezonePage *page = user_data;
GisTimezonePagePrivate *priv = gis_timezone_page_get_instance_private (page);
- GError *error = NULL;
+ g_autoptr(GError) local_error = NULL;
- priv->geoclue_simple = gclue_simple_new_finish (res, &error);
- if (error != NULL)
+ priv->geoclue_simple = gclue_simple_new_finish (res, &local_error);
+ if (local_error != NULL)
{
- g_critical ("Failed to connect to GeoClue2 service: %s", error->message);
- g_error_free (error);
+ g_critical ("Failed to connect to GeoClue2 service: %s", local_error->message);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]