|
VLC 4.0.0-dev
|
Macros | |
| #define | add_overflow(a, b, r) |
| Overflowing addition. More... | |
| #define | mul_overflow(a, b, r) |
| Overflowing multiplication. More... | |
Functions | |
| static bool | uadd_overflow (unsigned a, unsigned b, unsigned *res) |
| static bool | uaddl_overflow (unsigned long a, unsigned long b, unsigned long *res) |
| static bool | uaddll_overflow (unsigned long long a, unsigned long long b, unsigned long long *res) |
| static bool | umul_overflow (unsigned a, unsigned b, unsigned *res) |
| static bool | umull_overflow (unsigned long a, unsigned long b, unsigned long *res) |
| static bool | umulll_overflow (unsigned long long a, unsigned long long b, unsigned long long *res) |
| #define add_overflow | ( | a, | |
| b, | |||
| r | |||
| ) |
Overflowing addition.
Converts a and b to the type of *r. Then computes the sum of both conversions while checking for overflow. Finally stores the result in *r.
| a | an integer |
| b | an integer |
| r | a pointer to an integer [OUT] |
| false | The sum did not overflow. |
| true | The sum overflowed. |
| #define mul_overflow | ( | a, | |
| b, | |||
| r | |||
| ) |
Overflowing multiplication.
Converts a and b to the type of *r. Then computes the product of both conversions while checking for overflow. Finally stores the result in *r.
| a | an integer |
| b | an integer |
| r | a pointer to an integer [OUT] |
| false | The product did not overflow. |
| true | The product overflowed. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |