line |
true |
false |
branch |
27
|
348891 |
25942 |
if (a->start < b->start) return -1; |
28
|
0 |
25942 |
else if (a->start == b->start) return 0; |
44
|
0 |
1251 |
if (ptr + sizeof(head) > end) return -1; |
|
0 |
1251 |
if (ptr + sizeof(head) > end) return -1; |
48
|
0 |
1251 |
if (strncmp(head.tzh_magic, FTZ_MAGIC, sizeof(head.tzh_magic)) != 0) { |
|
0 |
1251 |
if (strncmp(head.tzh_magic, FTZ_MAGIC, sizeof(head.tzh_magic)) != 0) { |
53
|
1251 |
0 |
*version = head.tzh_version[0] ? (head.tzh_version[0] - '0') : 1; |
|
1251 |
0 |
*version = head.tzh_version[0] ? (head.tzh_version[0] - '0') : 1; |
67
|
0 |
1251 |
if (head.tzh_typecnt > FTZ_MAX_TYPES) { |
|
0 |
1251 |
if (head.tzh_typecnt > FTZ_MAX_TYPES) { |
72
|
0 |
1251 |
if (head.tzh_charcnt > FTZ_MAX_CHARS) { |
|
0 |
1251 |
if (head.tzh_charcnt > FTZ_MAX_CHARS) { |
77
|
0 |
1251 |
if (head.tzh_leapcnt > FTZ_MAX_LEAPS) { |
|
0 |
1251 |
if (head.tzh_leapcnt > FTZ_MAX_LEAPS) { |
86
|
0 |
1251 |
if (ptr + PTIME_TZPARSE_BODY_BASE_SIZE(head) > end) return false; |
|
0 |
0 |
if (ptr + PTIME_TZPARSE_BODY_BASE_SIZE(head) > end) return false; |
95
|
7092 |
1251 |
for (uint32_t i = 0; i < head.tzh_typecnt; i++) { |
|
0 |
0 |
for (uint32_t i = 0; i < head.tzh_typecnt; i++) { |
105
|
610 |
641 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
|
610 |
0 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
|
610 |
0 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
|
0 |
0 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
|
0 |
0 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
|
0 |
0 |
zone->leaps = zone->leaps_cnt > 0 ? new Timezone::Leap[zone->leaps_cnt] : NULL; |
106
|
16470 |
1251 |
for (uint32_t i = 0; i < head.tzh_leapcnt; i++) { |
|
0 |
0 |
for (uint32_t i = 0; i < head.tzh_leapcnt; i++) { |
121
|
1563 |
2 |
for (uint32_t i = 0; i < head.tzh_timecnt; ++i) { |
|
0 |
0 |
for (uint32_t i = 0; i < head.tzh_timecnt; ++i) { |
122
|
314 |
1249 |
if (ilocaltypes[i] != 0) continue; |
|
0 |
0 |
if (ilocaltypes[i] != 0) continue; |
126
|
1249 |
2 |
if (past_lt_index < 0) for (uint32_t i = 0; i < head.tzh_typecnt; ++i) { |
|
1265 |
0 |
if (past_lt_index < 0) for (uint32_t i = 0; i < head.tzh_typecnt; ++i) { |
|
0 |
0 |
if (past_lt_index < 0) for (uint32_t i = 0; i < head.tzh_typecnt; ++i) { |
|
0 |
0 |
if (past_lt_index < 0) for (uint32_t i = 0; i < head.tzh_typecnt; ++i) { |
127
|
16 |
1249 |
if (localtypes[i].isdst) continue; |
|
0 |
0 |
if (localtypes[i].isdst) continue; |
131
|
0 |
1251 |
if (past_lt_index < 0) past_lt_index = 0; |
|
0 |
0 |
if (past_lt_index < 0) past_lt_index = 0; |
134
|
1251 |
0 |
zone->trans = new Timezone::Transition[zone->trans_cnt]; |
|
1251 |
0 |
zone->trans = new Timezone::Transition[zone->trans_cnt]; |
|
0 |
0 |
zone->trans = new Timezone::Transition[zone->trans_cnt]; |
|
0 |
0 |
zone->trans = new Timezone::Transition[zone->trans_cnt]; |
150
|
0 |
1251 |
if (strlen(past_abbrev) > ZONE_ABBR_MAX) { |
|
0 |
0 |
if (strlen(past_abbrev) > ZONE_ABBR_MAX) { |
157
|
88284 |
1251 |
for (uint32_t i = 0; i < head.tzh_timecnt; ++i) { |
|
0 |
0 |
for (uint32_t i = 0; i < head.tzh_timecnt; ++i) { |
172
|
16470 |
1251 |
for (uint32_t i = 0; i < zone->leaps_cnt; i++) { |
|
0 |
0 |
for (uint32_t i = 0; i < zone->leaps_cnt; i++) { |
178
|
1251 |
0 |
qsort(zone->trans, zone->trans_cnt, sizeof(*zone->trans), trans_cmp); |
|
0 |
0 |
qsort(zone->trans, zone->trans_cnt, sizeof(*zone->trans), trans_cmp); |
180
|
104754 |
1251 |
for (uint32_t i = 1; i < zone->trans_cnt; ++i) { |
|
0 |
0 |
for (uint32_t i = 1; i < zone->trans_cnt; ++i) { |
184
|
16470 |
88284 |
if (this_trans->leap_corr != 0) { |
|
0 |
0 |
if (this_trans->leap_corr != 0) { |
210
|
0 |
1251 |
if (posixstr >= end) { zone->clear(); return false; } |
212
|
0 |
1251 |
if (posixend == NULL) { zone->clear(); return false; } |
217
|
4 |
1247 |
if (posixend == posixstr) { // no posix string, using last transition |
|
0 |
0 |
if (posixend == posixstr) { // no posix string, using last transition |
223
|
1247 |
0 |
else if (!tzparse_rule(string_view(posixstr, posixend-posixstr), &zone->future)) { |
|
0 |
1247 |
else if (!tzparse_rule(string_view(posixstr, posixend-posixstr), &zone->future)) { |
|
0 |
0 |
else if (!tzparse_rule(string_view(posixstr, posixend-posixstr), &zone->future)) { |
|
0 |
0 |
else if (!tzparse_rule(string_view(posixstr, posixend-posixstr), &zone->future)) { |
230
|
449 |
802 |
if (zone->future.hasdst) { |
|
0 |
0 |
if (zone->future.hasdst) { |