MCPcopy Create free account
hub / github.com/eggert/tz / increment_overflow

Function increment_overflow

localtime.c:2462–2481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2460 : *tp <= TIME_T_MAX - j))
2461 return true;
2462 *tp += j;
2463 return false;
2464#endif
2465}
2466
2467/* Return A - B, where both are in the range -2**31 + 1 .. 2**31 - 1.
2468 The result cannot overflow. */
2469static int_fast64_t
2470utoff_diff (int_fast32_t a, int_fast32_t b)
2471{
2472 int_fast64_t aa = a;
2473 return aa - b;
2474}
2475
2476static int
2477tmcomp(register const struct tm *const atmp,
2478 register const struct tm *const btmp)
2479{
2480 register int result;
2481
2482 if (atmp->tm_year != btmp->tm_year)
2483 return atmp->tm_year < btmp->tm_year ? -1 : 1;
2484 if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 &&

Callers 1

tzparseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected