|
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) |
|
◆ add_overflow
#define add_overflow |
( |
|
a, |
|
|
|
b, |
|
|
|
r |
|
) |
| |
Value:
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
.
- Parameters
-
a | an integer |
b | an integer |
r | a pointer to an integer [OUT] |
- Return values
-
false | The sum did not overflow. |
true | The sum overflowed. |
◆ mul_overflow
#define mul_overflow |
( |
|
a, |
|
|
|
b, |
|
|
|
r |
|
) |
| |
Value:
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
.
- Parameters
-
a | an integer |
b | an integer |
r | a pointer to an integer [OUT] |
- Return values
-
false | The product did not overflow. |
true | The product overflowed. |
◆ uadd_overflow()
static bool uadd_overflow |
( |
unsigned |
a, |
|
|
unsigned |
b, |
|
|
unsigned * |
res |
|
) |
| |
|
inlinestatic |
◆ uaddl_overflow()
static bool uaddl_overflow |
( |
unsigned long |
a, |
|
|
unsigned long |
b, |
|
|
unsigned long * |
res |
|
) |
| |
|
inlinestatic |
◆ uaddll_overflow()
static bool uaddll_overflow |
( |
unsigned long long |
a, |
|
|
unsigned long long |
b, |
|
|
unsigned long long * |
res |
|
) |
| |
|
inlinestatic |
◆ umul_overflow()
static bool umul_overflow |
( |
unsigned |
a, |
|
|
unsigned |
b, |
|
|
unsigned * |
res |
|
) |
| |
|
inlinestatic |
◆ umull_overflow()
static bool umull_overflow |
( |
unsigned long |
a, |
|
|
unsigned long |
b, |
|
|
unsigned long * |
res |
|
) |
| |
|
inlinestatic |
◆ umulll_overflow()
static bool umulll_overflow |
( |
unsigned long long |
a, |
|
|
unsigned long long |
b, |
|
|
unsigned long long * |
res |
|
) |
| |
|
inlinestatic |
static bool umulll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:909
static bool uaddl_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:824
static bool umull_overflow(unsigned long a, unsigned long b, unsigned long *res)
Definition: vlc_common.h:898
static bool uadd_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:814
static bool uaddll_overflow(unsigned long long a, unsigned long long b, unsigned long long *res)
Definition: vlc_common.h:835
static bool umul_overflow(unsigned a, unsigned b, unsigned *res)
Definition: vlc_common.h:888