From b1cd3378fb107bb7807482298dbef361a591a084 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 21 Jun 2014 10:27:27 +0100 Subject: [PATCH] gdatetime: Remove an unnecessary NULL pointer check datetime->tz can never be NULL, so this pointer check is unnecessary and confusing, and messes up static analysis. https://bugzilla.gnome.org/show_bug.cgi?id=732000 --- glib/gdatetime.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/glib/gdatetime.c b/glib/gdatetime.c index 11e10e570..624d74e2b 100644 --- a/glib/gdatetime.c +++ b/glib/gdatetime.c @@ -2561,10 +2561,7 @@ g_date_time_format_locale (GDateTime *datetime, case 'z': { gint64 offset; - if (datetime->tz != NULL) - offset = g_date_time_get_utc_offset (datetime) / USEC_PER_SECOND; - else - offset = 0; + offset = g_date_time_get_utc_offset (datetime) / USEC_PER_SECOND; if (!format_z (outstr, (int) offset, colons)) return FALSE; } -- 2.11.4.GIT