diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-16 11:02:00 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-16 11:02:00 +0800 |
commit | 10331b3632cb9f11514703222a7d6dc99b6fb853 (patch) | |
tree | 15b375d45e854f8c62b68cf07e62001b4915a3af | |
parent | b0b61a0724c7a9753f5d5e97166077c4dcecc617 (diff) | |
download | gsoc2013-evolution-10331b3632cb9f11514703222a7d6dc99b6fb853.tar.gz gsoc2013-evolution-10331b3632cb9f11514703222a7d6dc99b6fb853.tar.zst gsoc2013-evolution-10331b3632cb9f11514703222a7d6dc99b6fb853.zip |
Fix a potential uninitialized return value in e-timezone-dialog.c.
Caught by the Clang Static Analyzer.
-rw-r--r-- | widgets/e-timezone-dialog/e-timezone-dialog.c | 9 |
1 files changed, 4 insertions, 5 deletions
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); |