* power-of-two value.
*/
#define RTE_ALIGN_FLOOR(val, align) \
- (typeof(val))(val & (~((typeof(val))(align - 1))))
+ (typeof(val))((val) & (~((typeof(val))((align) - 1))))
/**
* Macro to align a pointer to a given power-of-two. The resultant
* must be a power-of-two value.
*/
#define RTE_PTR_ALIGN_CEIL(ptr, align) \
- RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(ptr, align - 1), align)
+ RTE_PTR_ALIGN_FLOOR(RTE_PTR_ADD(ptr, (align) - 1), align)
/**
* Macro to align a value to a given power-of-two. The resultant value
* value.
*/
#define RTE_ALIGN_CEIL(val, align) \
- RTE_ALIGN_FLOOR((val + ((typeof(val)) align - 1)), align)
+ RTE_ALIGN_FLOOR(((val) + ((typeof(val)) (align) - 1)), align)
/**
* Macro to align a pointer to a given power-of-two. The resultant