Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/time/tzset_r.c')
-rw-r--r--newlib/libc/time/tzset_r.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/time/tzset_r.c b/newlib/libc/time/tzset_r.c
index d8f5c667e..5a5a9599b 100644
--- a/newlib/libc/time/tzset_r.c
+++ b/newlib/libc/time/tzset_r.c
@@ -28,6 +28,8 @@ _DEFUN (_tzset_r, (reent_ptr),
_daylight = 0;
_tzname[0] = "GMT";
_tzname[1] = "GMT";
+ free(prev_tzenv);
+ prev_tzenv = NULL;
TZ_UNLOCK;
return;
}
@@ -80,8 +82,10 @@ _DEFUN (_tzset_r, (reent_ptr),
tzenv += n;
if (sscanf (tzenv, "%10[^0-9,+-]%n", __tzname_dst, &n) <= 0)
- {
+ { /* No dst */
_tzname[1] = _tzname[0];
+ _timezone = tz->__tzrule[0].offset;
+ _daylight = 0;
TZ_UNLOCK;
return;
}