| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | enum { DEFAULT_MXFAST = 64 * sizeof (size_t) / 4 }; | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - | - |
| 17 | __builtin_offsetof ( | - |
| 18 | struct tm_zone | - |
| 19 | , | - |
| 20 | abbrs | - |
| 21 | ) | - |
| 22 | }; | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | static timezone_t const local_tz = (timezone_t) 1; | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | static | - |
| 34 | _Bool | - |
| 35 | | - |
| 36 | isdst_differ (int a, int b) | - |
| 37 | { | - |
| 38 | return never executed: return !a != !b && 0 <= a && 0 <= b; !a != !b && 0 <= a && 0 <= b;never executed: return !a != !b && 0 <= a && 0 <= b; | 0 |
| 39 | } | - |
| 40 | | - |
| 41 | | - |
| 42 | static int | - |
| 43 | equal_tm (const struct tm *a, const struct tm *b) | - |
| 44 | { | - |
| 45 | return never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); ! ((a->tm_sec ^ b->tm_sec)never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 46 | | (a->tm_min ^ b->tm_min) never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 47 | | (a->tm_hour ^ b->tm_hour) never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 48 | | (a->tm_mday ^ b->tm_mday) never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 49 | | (a->tm_mon ^ b->tm_mon) never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 50 | | (a->tm_year ^ b->tm_year) never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 51 | | isdst_differ (a->tm_isdst, b->tm_isdst)); never executed: return ! ((a->tm_sec ^ b->tm_sec) | (a->tm_min ^ b->tm_min) | (a->tm_hour ^ b->tm_hour) | (a->tm_mday ^ b->tm_mday) | (a->tm_mon ^ b->tm_mon) | (a->tm_year ^ b->tm_year) | isdst_differ (a->tm_isdst, b->tm_isdst)); | 0 |
| 52 | } | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | static void | - |
| 60 | extend_abbrs (char *abbrs, char const *abbr, size_t abbr_size) | - |
| 61 | { | - |
| 62 | memcpy (abbrs, abbr, abbr_size); | - |
| 63 | abbrs[abbr_size] = '\0'; | - |
| 64 | }executed 2942 times by 7 tests: end of block | 2942 |
| 65 | | - |
| 66 | | - |
| 67 | | - |
| 68 | timezone_t | - |
| 69 | tzalloc (char const *name) | - |
| 70 | { | - |
| 71 | size_t name_size = name| TRUE | evaluated 280 times by 5 tests | | FALSE | evaluated 2666 times by 8 testsEvaluated by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
|
? strlen (name) + 1 : 0; | 280-2666 |
| 72 | size_t abbr_size = name_size < ABBR_SIZE_MIN| TRUE | evaluated 2944 times by 8 testsEvaluated by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
| | FALSE | evaluated 2 times by 1 test |
? ABBR_SIZE_MIN : name_size + 1; | 2-2944 |
| 73 | timezone_t tz = malloc ((( | - |
| 74 | __builtin_offsetof ( | - |
| 75 | struct tm_zone | - |
| 76 | , | - |
| 77 | abbrs | - |
| 78 | ) | - |
| 79 | + _Alignof (struct tm_zone) - 1 + (abbr_size)) & ~ (_Alignof (struct tm_zone) - 1))); | - |
| 80 | if (tz| TRUE | evaluated 2946 times by 8 testsEvaluated by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
| | FALSE | never evaluated |
) | 0-2946 |
| 81 | { | - |
| 82 | tz->next = | - |
| 83 | ((void *)0) | - |
| 84 | ; | - |
| 85 | | - |
| 86 | | - |
| 87 | | - |
| 88 | tz->tz_is_set = !!name; | - |
| 89 | tz->abbrs[0] = '\0'; | - |
| 90 | if (name| TRUE | evaluated 280 times by 5 tests | | FALSE | evaluated 2666 times by 8 testsEvaluated by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
|
) | 280-2666 |
| 91 | extend_abbrs (tz->abbrs, name, name_size);executed 280 times by 5 tests: extend_abbrs (tz->abbrs, name, name_size); | 280 |
| 92 | }executed 2946 times by 8 tests: end of blockExecuted by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
| 2946 |
| 93 | returnexecuted 2946 times by 8 tests: return tz;Executed by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
tz;executed 2946 times by 8 tests: return tz;Executed by:- date
- dir
- du
- ls
- pr
- stat
- touch
- vdir
| 2946 |
| 94 | } | - |
| 95 | | - |
| 96 | | - |
| 97 | | - |
| 98 | | - |
| 99 | | - |
| 100 | static | - |
| 101 | _Bool | - |
| 102 | | - |
| 103 | save_abbr (timezone_t tz, struct tm *tm) | - |
| 104 | { | - |
| 105 | | - |
| 106 | char const *zone = | - |
| 107 | ((void *)0) | - |
| 108 | ; | - |
| 109 | char *zone_copy = (char *) ""; | - |
| 110 | | - |
| 111 | | - |
| 112 | | - |
| 113 | | - |
| 114 | | - |
| 115 | | - |
| 116 | zone = tm->tm_zone; | - |
| 117 | if (!zone| TRUE | never evaluated | | FALSE | evaluated 7912 times by 7 tests |
|| ((| TRUE | never evaluated | | FALSE | evaluated 7912 times by 7 tests |
char *) tm <= zone| TRUE | never evaluated | | FALSE | evaluated 7912 times by 7 tests |
&& zone < (char *) (tm + 1)| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0-7912 |
| 118 | return never executed: return 1 ; never executed: return 1 ; | 0 |
| 119 | 1 never executed: return 1 ; | 0 |
| 120 | ; never executed: return 1 ; | 0 |
| 121 | | - |
| 122 | if (*| TRUE | evaluated 7912 times by 7 tests | | FALSE | never evaluated |
zone| TRUE | evaluated 7912 times by 7 tests | | FALSE | never evaluated |
) | 0-7912 |
| 123 | { | - |
| 124 | zone_copy = tz->abbrs; | - |
| 125 | | - |
| 126 | while ( | - |
| 127 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 128 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 129 | ) && __builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 130 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 131 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 132 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 133 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 134 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 135 | ), (!((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 136 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 137 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 138 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 139 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 140 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 141 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 142 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 143 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 144 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 145 | , | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 146 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 147 | ) : (__builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 148 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 149 | ) && ((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 150 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 151 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 152 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 153 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 154 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 155 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 156 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 157 | ) && ((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 158 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 159 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 160 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 161 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 162 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 163 | , | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 164 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 165 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 166 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 167 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 168 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 169 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 170 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 171 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 172 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 173 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( zone_copy ))[3] - __s2[3]); | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 174 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
never executed: __result = (((const unsigned char *) (const char *) ( zone_copy ))[3] - __s2[3]); | 0-6324 |
| 175 | ))[3] - __s2[3]);| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
never executed: __result = (((const unsigned char *) (const char *) ( zone_copy ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 176 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 177 | ) && ((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 178 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 179 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 180 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 181 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 182 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 183 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 184 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 185 | ) && ((size_t)(const void *)((| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 186 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 187 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 188 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 189 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 190 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 191 | , | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 192 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 193 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 194 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 195 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 196 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 197 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 198 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 199 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 200 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 201 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( zone ))[3] - __s2[3]); | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 202 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
never executed: __result = (((const unsigned char *) (const char *) ( zone ))[3] - __s2[3]); | 0-6324 |
| 203 | ))[3] - __s2[3]);| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
never executed: __result = (((const unsigned char *) (const char *) ( zone ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 0-6324 |
| 204 | zone_copy| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 205 | , | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 206 | zone| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 207 | )))); }) | TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
| 5249-6324 |
| 208 | != 0| TRUE | evaluated 6324 times by 7 tests | | FALSE | evaluated 5249 times by 4 tests |
) | 5249-6324 |
| 209 | { | - |
| 210 | if (! (*| TRUE | evaluated 3657 times by 5 tests | | FALSE | evaluated 2667 times by 7 tests |
zone_copy| TRUE | evaluated 3657 times by 5 tests | | FALSE | evaluated 2667 times by 7 tests |
|| (zone_copy == tz->abbrs| TRUE | evaluated 1642 times by 6 tests | | FALSE | evaluated 1025 times by 5 tests |
&& tz->tz_is_set| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 1638 times by 6 tests |
))) | 4-3657 |
| 211 | { | - |
| 212 | size_t zone_size = strlen (zone) + 1; | - |
| 213 | size_t zone_used = zone_copy - tz->abbrs; | - |
| 214 | if (((| TRUE | never evaluated | | FALSE | evaluated 2663 times by 7 tests |
size_t) -1) - zone_used < zone_size| TRUE | never evaluated | | FALSE | evaluated 2663 times by 7 tests |
) | 0-2663 |
| 215 | { | - |
| 216 | | - |
| 217 | (*__errno_location ()) | - |
| 218 | = | - |
| 219 | 12 | - |
| 220 | ; | - |
| 221 | return never executed: return 0 ; never executed: return 0 ; | 0 |
| 222 | 0 never executed: return 0 ; | 0 |
| 223 | ; never executed: return 0 ; | 0 |
| 224 | } | - |
| 225 | if (zone_used + zone_size < ABBR_SIZE_MIN| TRUE | evaluated 2662 times by 7 tests | | FALSE | evaluated 1 time by 1 test |
) | 1-2662 |
| 226 | extend_abbrs (zone_copy, zone, zone_size);executed 2662 times by 7 tests: extend_abbrs (zone_copy, zone, zone_size); | 2662 |
| 227 | else | - |
| 228 | { | - |
| 229 | tz = tz->next = tzalloc (zone); | - |
| 230 | if (!tz| TRUE | never evaluated | | FALSE | evaluated 1 time by 1 test |
) | 0-1 |
| 231 | return never executed: return 0 ; never executed: return 0 ; | 0 |
| 232 | 0 never executed: return 0 ; | 0 |
| 233 | ; never executed: return 0 ; | 0 |
| 234 | tz->tz_is_set = 0; | - |
| 235 | zone_copy = tz->abbrs; | - |
| 236 | }executed 1 time by 1 test: end of block | 1 |
| 237 | break;executed 2663 times by 7 tests: break; | 2663 |
| 238 | } | - |
| 239 | | - |
| 240 | zone_copy += strlen (zone_copy) + 1; | - |
| 241 | if (!*zone_copy| TRUE | evaluated 1029 times by 5 tests | | FALSE | evaluated 2632 times by 2 tests |
&& tz->next| TRUE | evaluated 4 times by 1 test | | FALSE | evaluated 1025 times by 5 tests |
) | 4-2632 |
| 242 | { | - |
| 243 | tz = tz->next; | - |
| 244 | zone_copy = tz->abbrs; | - |
| 245 | }executed 4 times by 1 test: end of block | 4 |
| 246 | }executed 3661 times by 5 tests: end of block | 3661 |
| 247 | }executed 7912 times by 7 tests: end of block | 7912 |
| 248 | | - |
| 249 | | - |
| 250 | | - |
| 251 | tm->tm_zone = zone_copy; | - |
| 252 | | - |
| 253 | | - |
| 254 | | - |
| 255 | | - |
| 256 | | - |
| 257 | | - |
| 258 | returnexecuted 7912 times by 7 tests: return 1 ; executed 7912 times by 7 tests: return 1 ; | 7912 |
| 259 | 1executed 7912 times by 7 tests: return 1 ; | 7912 |
| 260 | ;executed 7912 times by 7 tests: return 1 ; | 7912 |
| 261 | } | - |
| 262 | | - |
| 263 | | - |
| 264 | void | - |
| 265 | tzfree (timezone_t tz) | - |
| 266 | { | - |
| 267 | if (tz != local_tz| TRUE | evaluated 80 times by 2 tests | | FALSE | never evaluated |
) | 0-80 |
| 268 | while (tz| TRUE | evaluated 81 times by 2 tests | | FALSE | evaluated 80 times by 2 tests |
) | 80-81 |
| 269 | { | - |
| 270 | timezone_t next = tz->next; | - |
| 271 | free (tz); | - |
| 272 | tz = next; | - |
| 273 | }executed 81 times by 2 tests: end of block | 81 |
| 274 | }executed 80 times by 2 tests: end of block | 80 |
| 275 | | - |
| 276 | | - |
| 277 | | - |
| 278 | | - |
| 279 | | - |
| 280 | static char * | - |
| 281 | getenv_TZ (void) | - |
| 282 | { | - |
| 283 | returnexecuted 7913 times by 7 tests: return getenv ("TZ"); getenv ("TZ");executed 7913 times by 7 tests: return getenv ("TZ"); | 7913 |
| 284 | } | - |
| 285 | | - |
| 286 | | - |
| 287 | | - |
| 288 | static int | - |
| 289 | setenv_TZ (char const *tz) | - |
| 290 | { | - |
| 291 | returnexecuted 66 times by 1 test: return tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ"); tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ");executed 66 times by 1 test: return tz ? setenv ("TZ", tz, 1) : unsetenv ("TZ"); | 66 |
| 292 | } | - |
| 293 | | - |
| 294 | | - |
| 295 | | - |
| 296 | | - |
| 297 | static | - |
| 298 | _Bool | - |
| 299 | | - |
| 300 | change_env (timezone_t tz) | - |
| 301 | { | - |
| 302 | if (setenv_TZ (tz->tz_is_set ? tz->abbrs : | TRUE | never evaluated | | FALSE | evaluated 66 times by 1 test |
| 0-66 |
| 303 | ((void *)0)| TRUE | never evaluated | | FALSE | evaluated 66 times by 1 test |
| 0-66 |
| 304 | ) != 0| TRUE | never evaluated | | FALSE | evaluated 66 times by 1 test |
) | 0-66 |
| 305 | return never executed: return 0 ; never executed: return 0 ; | 0 |
| 306 | 0 never executed: return 0 ; | 0 |
| 307 | ; never executed: return 0 ; | 0 |
| 308 | tzset (); | - |
| 309 | returnexecuted 66 times by 1 test: return 1 ; executed 66 times by 1 test: return 1 ; | 66 |
| 310 | 1executed 66 times by 1 test: return 1 ; | 66 |
| 311 | ;executed 66 times by 1 test: return 1 ; | 66 |
| 312 | } | - |
| 313 | | - |
| 314 | | - |
| 315 | | - |
| 316 | | - |
| 317 | | - |
| 318 | static timezone_t | - |
| 319 | set_tz (timezone_t tz) | - |
| 320 | { | - |
| 321 | char *env_tz = getenv_TZ (); | - |
| 322 | if (env_tz| TRUE | evaluated 1365 times by 5 tests | | FALSE | evaluated 6548 times by 6 tests |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 33-7880 |
| 323 | ? tz->tz_is_set| TRUE | evaluated 1365 times by 5 tests | | FALSE | never evaluated |
&& | TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 324 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 325 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 326 | ) && __builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 327 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 328 | ) && (__s1_len = __builtin_strlen (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 329 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 330 | ), __s2_len = __builtin_strlen (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 331 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 332 | ), (!((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 333 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 334 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 335 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 336 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 337 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 338 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 339 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 340 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 341 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 342 | , | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 343 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 344 | ) : (__builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 345 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 346 | ) && ((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 347 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 348 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 349 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 350 | ) == 1) && (__s1_len = __builtin_strlen (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 351 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 352 | ), __s1_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 353 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 354 | ) && ((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 355 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 356 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 357 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 358 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 359 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 360 | , | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 361 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 362 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 363 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 364 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 365 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 366 | ))[0] - __s2[0]); if (__s1_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 367 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 368 | ))[1] - __s2[1]); if (__s1_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 369 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 370 | ))[2] - __s2[2]); if (__s1_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( tz->abbrs ))[3] - __s2[3]); | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 371 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( tz->abbrs ))[3] - __s2[3]); | 0-7880 |
| 372 | ))[3] - __s2[3]);| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( tz->abbrs ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 373 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 374 | ) && ((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 375 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 376 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 377 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 378 | ) == 1) && (__s2_len = __builtin_strlen (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 379 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 380 | ), __s2_len < 4) ? (__builtin_constant_p (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 381 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 382 | ) && ((size_t)(const void *)((| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 383 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 384 | ) + 1) - (size_t)(const void *)(| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 385 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 386 | ) == 1) ? __builtin_strcmp (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 387 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 388 | , | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 389 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 390 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 391 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 392 | ); int __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 393 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 394 | ))[0] - __s2[0]); if (__s2_len > 0| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 395 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 396 | ))[1] - __s2[1]); if (__s2_len > 1| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 397 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 398 | ))[2] - __s2[2]); if (__s2_len > 2| TRUE | never evaluated | | FALSE | never evaluated |
&& __result == 0| TRUE | never evaluated | | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( env_tz ))[3] - __s2[3]); | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 399 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( env_tz ))[3] - __s2[3]); | 0-7880 |
| 400 | ))[3] - __s2[3]);| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( env_tz ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 0-7880 |
| 401 | tz->abbrs| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 402 | , | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 403 | env_tz| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 404 | )))); }) | TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 405 | == 0| TRUE | evaluated 1342 times by 5 tests | | FALSE | evaluated 23 times by 1 test |
| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
| 23-7880 |
| 406 | : !tz->tz_is_set| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
) | 33-7880 |
| 407 | returnexecuted 7880 times by 7 tests: return local_tz; local_tz;executed 7880 times by 7 tests: return local_tz; | 7880 |
| 408 | else | - |
| 409 | { | - |
| 410 | timezone_t old_tz = tzalloc (env_tz); | - |
| 411 | if (!old_tz| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
) | 0-33 |
| 412 | return never executed: return old_tz; old_tz;never executed: return old_tz; | 0 |
| 413 | if (! change_env (tz)| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
) | 0-33 |
| 414 | { | - |
| 415 | int saved_errno = | - |
| 416 | (*__errno_location ()) | - |
| 417 | ; | - |
| 418 | tzfree (old_tz); | - |
| 419 | | - |
| 420 | (*__errno_location ()) | - |
| 421 | = saved_errno; | - |
| 422 | return never executed: return ((void *)0) ; never executed: return ((void *)0) ; | 0 |
| 423 | ((void *)0) never executed: return ((void *)0) ; | 0 |
| 424 | ; never executed: return ((void *)0) ; | 0 |
| 425 | } | - |
| 426 | returnexecuted 33 times by 1 test: return old_tz; old_tz;executed 33 times by 1 test: return old_tz; | 33 |
| 427 | } | - |
| 428 | } | - |
| 429 | | - |
| 430 | | - |
| 431 | | - |
| 432 | | - |
| 433 | static | - |
| 434 | _Bool | - |
| 435 | | - |
| 436 | revert_tz (timezone_t tz) | - |
| 437 | { | - |
| 438 | if (tz == local_tz| TRUE | evaluated 7880 times by 7 tests | | FALSE | evaluated 33 times by 1 test |
) | 33-7880 |
| 439 | returnexecuted 7880 times by 7 tests: return 1 ; executed 7880 times by 7 tests: return 1 ; | 7880 |
| 440 | 1executed 7880 times by 7 tests: return 1 ; | 7880 |
| 441 | ;executed 7880 times by 7 tests: return 1 ; | 7880 |
| 442 | else | - |
| 443 | { | - |
| 444 | int saved_errno = | - |
| 445 | (*__errno_location ()) | - |
| 446 | ; | - |
| 447 | | - |
| 448 | _Bool | - |
| 449 | ok = change_env (tz); | - |
| 450 | if (!ok| TRUE | never evaluated | | FALSE | evaluated 33 times by 1 test |
) | 0-33 |
| 451 | saved_errno = never executed: saved_errno = (*__errno_location ()) ; | 0 |
| 452 | (*__errno_location ()) never executed: saved_errno = (*__errno_location ()) ; | 0 |
| 453 | ; never executed: saved_errno = (*__errno_location ()) ; | 0 |
| 454 | tzfree (tz); | - |
| 455 | | - |
| 456 | (*__errno_location ()) | - |
| 457 | = saved_errno; | - |
| 458 | returnexecuted 33 times by 1 test: return ok; ok;executed 33 times by 1 test: return ok; | 33 |
| 459 | } | - |
| 460 | } | - |
| 461 | | - |
| 462 | | - |
| 463 | struct tm * | - |
| 464 | localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) | - |
| 465 | { | - |
| 466 | if (!tz| TRUE | never evaluated | | FALSE | evaluated 6168 times by 7 tests |
) | 0-6168 |
| 467 | return never executed: return gmtime_r (t, tm); gmtime_r (t, tm);never executed: return gmtime_r (t, tm); | 0 |
| 468 | else | - |
| 469 | { | - |
| 470 | timezone_t old_tz = set_tz (tz); | - |
| 471 | if (old_tz| TRUE | evaluated 6168 times by 7 tests | | FALSE | never evaluated |
) | 0-6168 |
| 472 | { | - |
| 473 | | - |
| 474 | _Bool | - |
| 475 | abbr_saved = localtime_r (t, tm)| TRUE | evaluated 6167 times by 7 tests | | FALSE | evaluated 1 time by 1 test |
&& save_abbr (tz, tm)| TRUE | evaluated 6167 times by 7 tests | | FALSE | never evaluated |
; | 0-6167 |
| 476 | if (revert_tz (old_tz)| TRUE | evaluated 6168 times by 7 tests | | FALSE | never evaluated |
&& abbr_saved| TRUE | evaluated 6167 times by 7 tests | | FALSE | evaluated 1 time by 1 test |
) | 0-6168 |
| 477 | returnexecuted 6167 times by 7 tests: return tm; tm;executed 6167 times by 7 tests: return tm; | 6167 |
| 478 | }executed 1 time by 1 test: end of block | 1 |
| 479 | returnexecuted 1 time by 1 test: return ((void *)0) ; executed 1 time by 1 test: return ((void *)0) ; | 1 |
| 480 | ((void *)0)executed 1 time by 1 test: return ((void *)0) ; | 1 |
| 481 | ;executed 1 time by 1 test: return ((void *)0) ; | 1 |
| 482 | } | - |
| 483 | } | - |
| 484 | | - |
| 485 | | - |
| 486 | time_t | - |
| 487 | mktime_z (timezone_t tz, struct tm *tm) | - |
| 488 | { | - |
| 489 | if (!tz| TRUE | never evaluated | | FALSE | evaluated 1745 times by 2 tests |
) | 0-1745 |
| 490 | return never executed: return timegm (tm); timegm (tm);never executed: return timegm (tm); | 0 |
| 491 | else | - |
| 492 | { | - |
| 493 | timezone_t old_tz = set_tz (tz); | - |
| 494 | if (old_tz| TRUE | evaluated 1745 times by 2 tests | | FALSE | never evaluated |
) | 0-1745 |
| 495 | { | - |
| 496 | time_t t = mktime (tm); | - |
| 497 | | - |
| 498 | time_t badtime = -1; | - |
| 499 | struct tm tm_1; | - |
| 500 | if ((t != badtime| TRUE | evaluated 1745 times by 2 tests | | FALSE | never evaluated |
| 0-1745 |
| 501 | || (localtime_r (&t, &tm_1)| TRUE | never evaluated | | FALSE | never evaluated |
&& equal_tm (tm, &tm_1)| TRUE | never evaluated | | FALSE | never evaluated |
)) | 0 |
| 502 | && !save_abbr (tz, tm)| TRUE | never evaluated | | FALSE | evaluated 1745 times by 2 tests |
) | 0-1745 |
| 503 | t = badtime; never executed: t = badtime; | 0 |
| 504 | | - |
| 505 | if (revert_tz (old_tz)| TRUE | evaluated 1745 times by 2 tests | | FALSE | never evaluated |
) | 0-1745 |
| 506 | returnexecuted 1745 times by 2 tests: return t; t;executed 1745 times by 2 tests: return t; | 1745 |
| 507 | } never executed: end of block | 0 |
| 508 | return never executed: return -1; -1;never executed: return -1; | 0 |
| 509 | } | - |
| 510 | } | - |
| | |