* lib/time_rz.c (localtime_rz): Return NULL if localtime_r fails,
while still attempting to pacify bleeding-edge GCC.
2015-10-18 Paul Eggert <eggert@cs.ucla.edu>
+ time_rz: return NULL if localtime_r fails
+ * lib/time_rz.c (localtime_rz): Return NULL if localtime_r fails,
+ while still attempting to pacify bleeding-edge GCC.
+
fts: port to C11 alignof
* doc/posix-headers/stdalign.texi (stdalign.h):
Document the C11 restriction.
timezone_t old_tz = set_tz (tz);
if (old_tz)
{
- if (localtime_r (t, tm) && !save_abbr (tz, tm))
- tm = NULL;
- if (revert_tz (old_tz))
+ bool abbr_saved = localtime_r (t, tm) && save_abbr (tz, tm);
+ if (revert_tz (old_tz) && abbr_saved)
return tm;
}
return NULL;