|
DTNMA Reference Tools v2.1.0 - 2.ga9a44fe
Delay-Tolerant Networking Management Architecture (DTNMA) Tool Suite
|
This file contains preprocessor utility definitions shared among the ARI library. More...
Macros | |
| #define | _U_ |
| Mark an unused parameter Within a function definition. | |
| #define | UNLIKELY(expr) (expr) |
| #define | LIKELY(expr) (expr) |
| #define | CHKRET(cond, val) |
| Check a condition and if not met return a specific value. | |
| #define | CHKVOID(cond) CHKRET(cond, ) |
| Return from void functions if condition fails. | |
| #define | CHKNULL(cond) CHKRET(cond, NULL) |
| Return a null pointer if condition fails. | |
| #define | CHKFALSE(cond) CHKRET(cond, false) |
| Return false if condition fails. | |
| #define | CHKERR1(cond) CHKRET(cond, 1) |
| Return the error value 1 if condition fails. | |
| #define | CHKERRVAL(value) CHKRET(!value, value) |
| Check a value for non-zero and return that value. | |
This file contains preprocessor utility definitions shared among the ARI library.
| #define _U_ |
Mark an unused parameter Within a function definition.
This avoids compiler warnings when parameters need to be present to satisfy an interface but are otherwise unused.
| #define CHKERRVAL | ( | value | ) | CHKRET(!value, value) |
Check a value for non-zero and return that value.
| value | The value to check and conditionally return. |
| #define CHKRET | ( | cond, | |
| val | |||
| ) |
Check a condition and if not met return a specific value.
| cond | The condition to check. |
| val | The return value if the check fails. |