diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-07 12:03:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-07 12:03:22 +0000 |
commit | fa7b75df7b8fb67a7d1efe11c0fb31f70507125d (patch) | |
tree | 23d6e6927cde0563c86ea5bb775fcc7dcad18693 /time | |
parent | 0078b1dd3d18c16a2ed031c135eebe21d54a8a01 (diff) | |
download | glibc-fa7b75df7b8fb67a7d1efe11c0fb31f70507125d.tar.gz glibc-fa7b75df7b8fb67a7d1efe11c0fb31f70507125d.tar.xz glibc-fa7b75df7b8fb67a7d1efe11c0fb31f70507125d.zip |
(__tzfile_read): Correct setting of __tzname array values.
(__tzfile_compute): Correct setting of __tzname array values.
Diffstat (limited to 'time')
-rw-r--r-- | time/tzfile.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/time/tzfile.c b/time/tzfile.c index 0a452b632f..c800d10148 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -271,8 +271,7 @@ __tzfile_read (const char *file) We choose the offsets in the types of each flavor that are transitioned to earliest in time. */ __tzname[1] = NULL; - for (i = 0; i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]); - ++i) + for (i = 0; i < num_types; ++i) __tzname[types[i].isdst] = __tzstring (&zone_names[types[i].idx]); if (__tzname[1] == NULL) __tzname[1] = __tzname[0]; @@ -425,10 +424,8 @@ __tzfile_compute (time_t timer, int use_localtime, __daylight = rule_stdoff != rule_dstoff; __timezone = -rule_stdoff; __tzname[1] = NULL; - for (i = 0; - i < num_types && i < sizeof (__tzname) / sizeof (__tzname[0]); - ++i) - __tzname[types[i].isdst] = &zone_names[types[i].idx]; + for (i = 0; i < num_types; ++i) + __tzname[types[i].isdst] = __tzstring (&zone_names[types[i].idx]); if (__tzname[1] == NULL) /* There is no daylight saving time. */ __tzname[1] = __tzname[0]; |