mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-25 11:42:10 +01:00
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
This commit is contained in:
parent
404c2d2454
commit
b1cd3378fb
@ -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;
|
||||
if (!format_z (outstr, (int) offset, colons))
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user