| 2115 | for times of day and for UT offsets in TZif files, and it |
| 2116 | avoids later problems during arithmetic on these numbers, |
| 2117 | as stringzone can compute up to 3 times one of these values |
| 2118 | when computing fake timezones, and stringrule can do a bit more. |
| 2119 | Do not limit R strictly to 32 bits here, as it is OK to go |
| 2120 | over the TZif limit temporarily so long as the result fits. */ |
| 2121 | omul(r, 4); |
| 2122 | /* Discard omul's return value, as it is not needed here. */ |
| 2123 | |
| 2124 | return r; |
| 2125 | } |
| 2126 | |
| 2127 | static zic_t |
| 2128 | getsave(char *field, bool *isdst) |
| 2129 | { |
| 2130 | int dst = -1; |
| 2131 | zic_t save; |
| 2132 | ptrdiff_t fieldlen = strlen(field); |
| 2133 | if (fieldlen != 0) { |
| 2134 | char *ep = field + fieldlen - 1; |
| 2135 | switch (*ep) { |
| 2136 | case 'd': dst = 1; *ep = '\0'; break; |