summaryrefslogtreecommitdiff
path: root/libc/time
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-06-24 16:26:34 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-06-24 16:26:34 +0000
commit0c0eed75570abfa84c7cebbbe4b2dd14492db0a8 (patch)
treeb61aa9fb0ab9b47e63f5d16c5fa8cb6e823c9bdf /libc/time
parent257ea412cd5f858b64148bef99d4bd6b882c4fb1 (diff)
Merge changes between r8519 and r8594 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@8595 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/time')
-rw-r--r--libc/time/tzfile.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libc/time/tzfile.c b/libc/time/tzfile.c
index 970022379..f4cba46e5 100644
--- a/libc/time/tzfile.c
+++ b/libc/time/tzfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006, 2007
+/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -248,7 +248,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
+ num_transitions * (8 + 1)
+ num_types * 6
+ chars
- + num_leaps * 8
+ + num_leaps * 12
+ num_isstd
+ num_isgmt) - 1 : 0);
@@ -419,6 +419,10 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
tzspec = __tzstring (tzstr);
}
+ /* Don't use an empty TZ string. */
+ if (tzspec != NULL && tzspec[0] == '\0')
+ tzspec = NULL;
+
fclose (f);
/* First "register" all timezone names. */
@@ -659,9 +663,7 @@ __tzfile_compute (time_t timer, int use_localtime,
__tzname[1] = __tzstring (&zone_names[strlen (zone_names) + 1]);
}
- *leap_correct = 0L;
- *leap_hit = 0;
- return;
+ goto leap;
}
else
{
@@ -762,6 +764,7 @@ __tzfile_compute (time_t timer, int use_localtime,
tp->tm_gmtoff = info->offset;
}
+ leap:
*leap_correct = 0L;
*leap_hit = 0;