* than the first parameter.
*/
#define RTE_ALIGN_MUL_CEIL(v, mul) \
- (((v + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul))
+ ((((v) + (typeof(v))(mul) - 1) / ((typeof(v))(mul))) * (typeof(v))(mul))
/**
* Macro to align a value to the multiple of given value. The resultant
* than the first parameter.
*/
#define RTE_ALIGN_MUL_FLOOR(v, mul) \
- ((v / ((typeof(v))(mul))) * (typeof(v))(mul))
+ (((v) / ((typeof(v))(mul))) * (typeof(v))(mul))
/**
* Macro to align value to the nearest multiple of the given value.
({ \
typeof(v) ceil = RTE_ALIGN_MUL_CEIL(v, mul); \
typeof(v) floor = RTE_ALIGN_MUL_FLOOR(v, mul); \
- (ceil - v) > (v - floor) ? floor : ceil; \
+ (ceil - (v)) > ((v) - floor) ? floor : ceil; \
})
/**