Skip to content

Commit cc8f337

Browse files
committed
rule fixup
1 parent d02365f commit cc8f337

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

options/ansi/generic/time.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ struct[[gnu::packed]] ttinfo {
590590

591591
// Let's just assume there's a maximum of two for now.
592592
ttinfo tt_infos[2];
593+
Rule rules[2];
593594

594595
static bool parse_tz(const char *tz, char *tz_name, char *tz_name_dst, size_t tz_name_max) {
595596
// POSIX defines :*characters* as a valid but implementation-defined format.
@@ -722,16 +723,15 @@ static bool parse_tz(const char *tz, char *tz_name, char *tz_name_dst, size_t tz
722723
if (*tz == '\0')
723724
tz = TZ_DEFAULT_RULE_STRING;
724725

725-
Rule start, end;
726726
if (*tz == ',') {
727727
tz++;
728-
tz = getrule(tz, &start);
728+
tz = getrule(tz, &rules[0]);
729729
if (tz == NULL)
730730
return false;
731731
if (*tz != ',')
732732
return false;
733733
tz++;
734-
tz = getrule(tz, &end);
734+
tz = getrule(tz, &rules[1]);
735735
if (tz == NULL)
736736
return false;
737737
if (*tz != '\0')

0 commit comments

Comments
 (0)