|
DTNMA Reference Tools v2.1.0 - 13.gc5c0bac
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 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.
| value | The value to check and conditionally return. |
| #define CHKFALSE | ( | cond | ) | CHKRET(cond, false) |
Return false if condition fails.
| #define CHKNULL | ( | cond | ) | CHKRET(cond, NULL) |
Return a null pointer if condition fails.
| #define CHKRET | ( | cond, | |
| val | |||
| ) |
| #define CHKVOID | ( | cond | ) | CHKRET(cond, ) |
Return from void functions if condition fails.
| #define LIKELY | ( | expr | ) | (expr) |
| #define UNLIKELY | ( | expr | ) | (expr) |