Line | Branch | Exec | Source |
---|---|---|---|
1 | #include <errno.h> | ||
2 | #include "arith.h" | ||
3 | |||
4 | 16027 | size_t xmul_(size_t a, size_t b) | |
5 | { | ||
6 | 16027 | size_t result; | |
7 | 16027 | bool overflow = size_multiply_overflows(a, b, &result); | |
8 |
1/2✗ Branch 0 (3→4) not taken.
✓ Branch 1 (3→5) taken 16027 times.
|
16027 | FATAL_ERROR_ON(overflow, EOVERFLOW); |
9 | 16027 | return result; | |
10 | } | ||
11 | |||
12 | 243029 | size_t xadd(size_t a, size_t b) | |
13 | { | ||
14 | 243029 | size_t result; | |
15 | 243029 | bool overflow = size_add_overflows(a, b, &result); | |
16 |
1/2✗ Branch 0 (3→4) not taken.
✓ Branch 1 (3→5) taken 243029 times.
|
243029 | FATAL_ERROR_ON(overflow, EOVERFLOW); |
17 | 243029 | return result; | |
18 | } | ||
19 |