[gnome-calendar] utils/date-time-utils: Trivial style cleanup



commit 9800fbec4bb269065258a7a35f3466aa67a334f7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Fri Feb 26 19:11:32 2021 -0300

    utils/date-time-utils: Trivial style cleanup

 src/utils/gcal-date-time-utils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/utils/gcal-date-time-utils.c b/src/utils/gcal-date-time-utils.c
index 658bf6fd..f7da80b9 100644
--- a/src/utils/gcal-date-time-utils.c
+++ b/src/utils/gcal-date-time-utils.c
@@ -218,10 +218,12 @@ gcal_date_time_from_icaltime (const ICalTime *date)
 {
   g_autoptr (GTimeZone) tz = NULL;
   g_autoptr (GDateTime) dt = NULL;
+  const gchar *identifier;
   ICalTimezone *zone;
 
   zone = i_cal_time_get_timezone (date);
-  tz = (zone && i_cal_timezone_get_location (zone)) ? g_time_zone_new (i_cal_timezone_get_location (zone)) : 
g_time_zone_new_utc ();
+  identifier = zone ? i_cal_timezone_get_location (zone) : NULL;
+  tz = identifier ? g_time_zone_new (identifier) : g_time_zone_new_utc ();
   dt = g_date_time_new (tz,
                         i_cal_time_get_year (date),
                         i_cal_time_get_month (date),


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