| 1429 | } |
| 1430 | |
| 1431 | int date_overflows(timestamp_t t) |
| 1432 | { |
| 1433 | time_t sys; |
| 1434 | |
| 1435 | /* If we overflowed our timestamp data type, that's bad... */ |
| 1436 | if ((uintmax_t)t >= TIME_MAX) |
| 1437 | return 1; |
| 1438 | |
| 1439 | /* |
| 1440 | * ...but we also are going to feed the result to system |
| 1441 | * functions that expect time_t, which is often "signed long". |
| 1442 | * Make sure that we fit into time_t, as well. |
| 1443 | */ |
| 1444 | sys = t; |
| 1445 | return t != sys || (t < 1) != (sys < 1); |
| 1446 | } |
no outgoing calls
no test coverage detected