[evolution] Fix a potential uninitialized return value in e-timezone-dialog.c.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Fix a potential uninitialized return value in e-timezone-dialog.c.
- Date: Sat, 16 Jan 2010 03:21:11 +0000 (UTC)
commit 10331b3632cb9f11514703222a7d6dc99b6fb853
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jan 15 22:02:00 2010 -0500
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 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 fa8c5ed..4110b55 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]