2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
* libc/time/tzset_r (_tzset_r): Fix loop.
This commit is contained in:
parent
4b30e15471
commit
3b54b74f3a
|
@ -1,3 +1,7 @@
|
||||||
|
2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
|
||||||
|
|
||||||
|
* libc/time/tzset_r (_tzset_r): Fix loop.
|
||||||
|
|
||||||
2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
|
2004-12-08 Alex Mogilnikov <alx@intellectronika.ru>
|
||||||
|
|
||||||
* libc/time/mktm_r (_mktm_r): Fix overflow calculation for
|
* libc/time/mktm_r (_mktm_r): Fix overflow calculation for
|
||||||
|
|
|
@ -122,11 +122,11 @@ _DEFUN (_tzset_r, (reent_ptr),
|
||||||
|
|
||||||
tzenv += n;
|
tzenv += n;
|
||||||
|
|
||||||
if (*tzenv == ',')
|
|
||||||
++tzenv;
|
|
||||||
|
|
||||||
for (i = 0; i < 2; ++i)
|
for (i = 0; i < 2; ++i)
|
||||||
{
|
{
|
||||||
|
if (*tzenv == ',')
|
||||||
|
++tzenv;
|
||||||
|
|
||||||
if (*tzenv == 'M')
|
if (*tzenv == 'M')
|
||||||
{
|
{
|
||||||
if (sscanf (tzenv, "M%hu%n.%hu%n.%hu%n", &m, &n, &w, &n, &d, &n) != 3 ||
|
if (sscanf (tzenv, "M%hu%n.%hu%n.%hu%n", &m, &n, &w, &n, &d, &n) != 3 ||
|
||||||
|
@ -187,11 +187,14 @@ _DEFUN (_tzset_r, (reent_ptr),
|
||||||
hh = 2;
|
hh = 2;
|
||||||
mm = 0;
|
mm = 0;
|
||||||
ss = 0;
|
ss = 0;
|
||||||
|
n = 0;
|
||||||
|
|
||||||
if (*tzenv == '/')
|
if (*tzenv == '/')
|
||||||
sscanf (tzenv, "%hu%n:%hu%n:%hu%n", &hh, &n, &mm, &n, &ss, &n);
|
sscanf (tzenv, "%hu%n:%hu%n:%hu%n", &hh, &n, &mm, &n, &ss, &n);
|
||||||
|
|
||||||
__tzrule[i].s = ss + SECSPERMIN * mm + SECSPERHOUR * hh;
|
__tzrule[i].s = ss + SECSPERMIN * mm + SECSPERHOUR * hh;
|
||||||
|
|
||||||
|
tzenv += n;
|
||||||
}
|
}
|
||||||
|
|
||||||
__tzcalc_limits (__tzyear);
|
__tzcalc_limits (__tzyear);
|
||||||
|
|
Loading…
Reference in New Issue