Line | Branch | Exec | Source |
---|---|---|---|
1 | #include <errno.h> | ||
2 | #include "arith.h" | ||
3 | |||
4 | 15881 | size_t xmul_(size_t a, size_t b) | |
5 | { | ||
6 | 15881 | size_t result; | |
7 |
1/2✗ Branch 0 (3→4) not taken.
✓ Branch 1 (3→5) taken 15881 times.
|
15881 | if (unlikely(size_multiply_overflows(a, b, &result))) { |
8 | − | fatal_error(__func__, EOVERFLOW); | |
9 | } | ||
10 | 15881 | return result; | |
11 | } | ||
12 | |||
13 | 241507 | size_t xadd(size_t a, size_t b) | |
14 | { | ||
15 | 241507 | size_t result; | |
16 |
1/2✗ Branch 0 (3→4) not taken.
✓ Branch 1 (3→5) taken 241507 times.
|
241507 | if (unlikely(size_add_overflows(a, b, &result))) { |
17 | − | fatal_error(__func__, EOVERFLOW); | |
18 | } | ||
19 | 241507 | return result; | |
20 | } | ||
21 |