From 10331b3632cb9f11514703222a7d6dc99b6fb853 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 15 Jan 2010 22:02:00 -0500 Subject: Fix a potential uninitialized return value in e-timezone-dialog.c. Caught by the Clang Static Analyzer. --- widgets/e-timezone-dialog/e-timezone-dialog.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'widgets/e-timezone-dialog') diff --git a/widgets/e-timezone-dialog/e-timezone-dialog.c b/widgets/e-timezone-dialog/e-timezone-dialog.c index fa8c5ed347..4110b55313 100644 --- a/widgets/e-timezone-dialog/e-timezone-dialog.c +++ b/widgets/e-timezone-dialog/e-timezone-dialog.c @@ -356,6 +356,8 @@ get_local_timezone(void) if (location) zone = icaltimezone_get_builtin_timezone (location); + else + zone = icaltimezone_get_utc_timezone (); g_free (location); @@ -697,11 +699,8 @@ e_timezone_dialog_set_timezone (ETimezoneDialog *etd, g_return_if_fail (E_IS_TIMEZONE_DIALOG (etd)); - if (!zone) { - zone = (icaltimezone *)get_local_timezone(); - if (!zone) - zone = icaltimezone_get_utc_timezone(); - } + if (!zone) + zone = get_local_timezone(); if (zone) display = zone_display_name_with_offset(zone); -- cgit v1.2.3