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

Function tadd

zic.c:4085–4093  ·  view source on GitHub ↗

Return T1 + T2, but diagnose any overflow and exit. This is like oadd, except the result must fit in min_time..max_time range, which on oddball machines can be a smaller range than ZIC_MIN..ZIC_MAX. */

Source from the content-addressed store, hash-verified

4083
4084/* Return T1 + T2, but diagnose any overflow and exit.
4085 This is like oadd, except the result must fit in min_time..max_time range,
4086 which on oddball machines can be a smaller range than ZIC_MIN..ZIC_MAX. */
4087ATTRIBUTE_PURE_114833_HACK
4088static zic_t
4089tadd(zic_t t1, zic_t t2)
4090{
4091 zic_t sum = oadd(t1, t2);
4092 if (min_time <= sum && sum <= max_time)
4093 return sum;
4094 time_overflow();
4095}
4096

Callers 5

getleapdatetimeFunction · 0.85
writezoneFunction · 0.85
outzoneFunction · 0.85
adjleapFunction · 0.85
rpytimeFunction · 0.85

Calls 2

oaddFunction · 0.85
time_overflowFunction · 0.85

Tested by

no test coverage detected