| 465 | } |
| 466 | |
| 467 | static int increment_overflow_time(time_t *tp, int_fast32_t j) { // #nocov start |
| 468 | /* |
| 469 | ** This is like |
| 470 | ** 'if (! (time_t_min <= *tp + j && *tp + j <= time_t_max)) ...', |
| 471 | ** except that it does the right thing even if *tp + j would overflow. |
| 472 | */ |
| 473 | if (! (j < 0 |
| 474 | ? (TYPE_SIGNED(time_t) ? time_t_min - j <= *tp : -1 - j < *tp) |
| 475 | : *tp <= time_t_max - j)) |
| 476 | return TRUE; |
| 477 | *tp += j; |
| 478 | return FALSE; |
| 479 | } |
| 480 | |
| 481 | static int_fast32_t detzcode(const char *const codep) { |
| 482 | int_fast32_t result = (codep[0] & 0x80) ? -1 : 0; |